类 JdkDynamicAopProxy

java.lang.Object
cn.taketoday.aop.framework.JdkDynamicAopProxy
所有已实现的接口:
AopProxy, Serializable, InvocationHandler

public class JdkDynamicAopProxy extends Object implements AopProxy, InvocationHandler, Serializable
JDK-based AopProxy implementation for the AOP framework, based on JDK dynamic proxies.

Creates a dynamic proxy, implementing the interfaces exposed by the AopProxy. Dynamic proxies cannot be used to proxy methods defined in classes, rather than interfaces.

Objects of this type should be obtained through proxy factories, configured by an AdvisedSupport class. This class is internal to AOP framework and need not be used directly by client code.

Proxies created using this class will be thread-safe if the underlying (target) class is thread-safe.

Proxies are serializable so long as all Advisors (including Advices and Pointcuts) and the TargetSource are serializable.

从以下版本开始:
3.0
作者:
Rod Johnson, Juergen Hoeller, Rob Harrop, Dave Syer, TODAY 2021/2/1 22:42
另请参阅:
  • 构造器详细资料

    • JdkDynamicAopProxy

      public JdkDynamicAopProxy(AdvisedSupport config)
      Construct a new JdkDynamicAopProxy for the given AOP configuration.
      参数:
      config - the AOP configuration as AdvisedSupport object
      抛出:
      AopConfigException - if the config is invalid. We try to throw an informative exception in this case, rather than let a mysterious failure happen later.
  • 方法详细资料

    • getProxy

      public Object getProxy()
      从接口复制的说明: AopProxy
      Create a new proxy object.

      Uses the AopProxy's default class loader (if necessary for proxy creation): usually, the thread context class loader.

      指定者:
      getProxy 在接口中 AopProxy
      返回:
      the new proxy object (never null)
      另请参阅:
    • getProxy

      public Object getProxy(ClassLoader classLoader)
      从接口复制的说明: AopProxy
      Create a new proxy object.

      Uses the given class loader (if necessary for proxy creation). null will simply be passed down and thus lead to the low-level proxy facility's default, which is usually different from the default chosen by the AopProxy implementation's AopProxy.getProxy() method.

      指定者:
      getProxy 在接口中 AopProxy
      参数:
      classLoader - the class loader to create the proxy with (or null for the low-level proxy facility's default)
      返回:
      the new proxy object (never null)
    • invoke

      @Nullable public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
      Implementation of InvocationHandler.invoke.

      Callers will see exactly the exception thrown by the target, unless a hook method throws an exception.

      指定者:
      invoke 在接口中 InvocationHandler
      抛出:
      Throwable
    • equals

      public boolean equals(Object other)
      Equality means interfaces, advisors and TargetSource are equal.

      The compared object may be a JdkDynamicAopProxy instance itself or a dynamic proxy wrapping a JdkDynamicAopProxy instance.

      覆盖:
      equals 在类中 Object
    • hashCode

      public int hashCode()
      Proxy uses the hash code of the TargetSource.
      覆盖:
      hashCode 在类中 Object