类 Proxy
java.lang.Object
cn.taketoday.bytecode.proxy.Proxy
- 所有已实现的接口:
Serializable
This class is meant to be used as replacement for
java.lang.reflect.Proxy under JDK 1.2. There are some known
subtle differences:
- The exceptions returned by invoking
getExceptionTypeson theMethodpassed to theinvokemethod are the exact set that can be thrown without resulting in anUndeclaredThrowableExceptionbeing thrown. UndeclaredThrowableExceptionis used instead ofjava.lang.reflect.UndeclaredThrowableException.
- 作者:
- TODAY
2019-09-03 18:51 - 另请参阅:
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static InvocationHandlergetInvocationHandler(Object proxy) static Class<?>getProxyClass(ClassLoader loader, Class<?>... interfaces) static booleanisProxyClass(Class<?> cl) static ObjectnewProxyInstance(ClassLoader loader, Class<?>[] interfaces, InvocationHandler h) Returns an instance of a proxy class for the specified interfaces that dispatches method invocations to the specified invocation handler.
-
字段详细资料
-
h
-
-
构造器详细资料
-
Proxy
-
-
方法详细资料
-
getInvocationHandler
-
getProxyClass
-
isProxyClass
-
newProxyInstance
public static Object newProxyInstance(ClassLoader loader, Class<?>[] interfaces, InvocationHandler h) Returns an instance of a proxy class for the specified interfaces that dispatches method invocations to the specified invocation handler.Proxy.newProxyInstancethrowsIllegalArgumentExceptionfor the same reasons thatProxy.getProxyClassdoes.- 参数:
loader- the class loader to define the proxy classinterfaces- the list of interfaces for the proxy class to implementh- the invocation handler to dispatch method invocations to- 返回:
- a proxy instance with the specified invocation handler of a proxy class that is defined by the specified class loader and that implements the specified interfaces
- 抛出:
NullPointerException- if theinterfacesarray argument or any of its elements arenull, or if the invocation handler,h, isnull
-