类 Proxy

java.lang.Object
cn.taketoday.bytecode.proxy.Proxy
所有已实现的接口:
Serializable

public class Proxy extends Object implements 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 getExceptionTypes on the Method passed to the invoke method are the exact set that can be thrown without resulting in an UndeclaredThrowableException being thrown.
  • UndeclaredThrowableException is used instead of java.lang.reflect.UndeclaredThrowableException.

作者:
TODAY
2019-09-03 18:51
另请参阅:
  • 字段详细资料

  • 构造器详细资料

  • 方法详细资料

    • getInvocationHandler

      public static InvocationHandler getInvocationHandler(Object proxy)
    • getProxyClass

      public static Class<?> getProxyClass(ClassLoader loader, Class<?>... interfaces)
    • isProxyClass

      public static boolean isProxyClass(Class<?> cl)
    • 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.newProxyInstance throws IllegalArgumentException for the same reasons that Proxy.getProxyClass does.

      参数:
      loader - the class loader to define the proxy class
      interfaces - the list of interfaces for the proxy class to implement
      h - 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 the interfaces array argument or any of its elements are null, or if the invocation handler, h, is null