-
Enhancement
-
Resolution: Duplicate
-
P4
-
None
-
5.0
-
None
-
x86
-
linux
Proxy.newProxyInstance is a little cumbersome to use because
1. Most of the time, you are only proxying to one interface, so you need to construct a one-element Class[].
2. You need to then cast the result.
Suggest a simple overload which would handle the common cases in a more type-safe way:
public static <T> T newProxyInstance(ClassLoader, Class<T>, InvocationHandler)
1. Most of the time, you are only proxying to one interface, so you need to construct a one-element Class[].
2. You need to then cast the result.
Suggest a simple overload which would handle the common cases in a more type-safe way:
public static <T> T newProxyInstance(ClassLoader, Class<T>, InvocationHandler)
- duplicates
-
JDK-6460347 (proxy) Add convenience method to create proxies
-
- Open
-