类 JdkDynamicAopProxy
- 所有已实现的接口:
AopProxy,Serializable,InvocationHandler
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(AdvisedSupport config) Construct a new JdkDynamicAopProxy for the given AOP configuration. -
方法概要
修饰符和类型方法说明booleanEquality means interfaces, advisors and TargetSource are equal.getProxy()Create a new proxy object.getProxy(ClassLoader classLoader) Create a new proxy object.inthashCode()Proxy uses the hash code of the TargetSource.Implementation ofInvocationHandler.invoke.
-
构造器详细资料
-
JdkDynamicAopProxy
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
从接口复制的说明:AopProxyCreate a new proxy object.Uses the AopProxy's default class loader (if necessary for proxy creation): usually, the thread context class loader.
-
getProxy
从接口复制的说明:AopProxyCreate a new proxy object.Uses the given class loader (if necessary for proxy creation).
nullwill 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'sAopProxy.getProxy()method. -
invoke
Implementation ofInvocationHandler.invoke.Callers will see exactly the exception thrown by the target, unless a hook method throws an exception.
- 指定者:
invoke在接口中InvocationHandler- 抛出:
Throwable
-
equals
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.
-
hashCode
public int hashCode()Proxy uses the hash code of the TargetSource.
-