AopProxy implementation for the Spring 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 Spring's 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.
java.lang.reflect.Proxy , AdvisedSupport, ProxyFactory
| Modifier and Type | Class and Description |
|---|---|
| private static class | JdkDynamicAopProxy.ProxiedInterfacesCache
Holder for the complete proxied interfaces and derived metadata,
to be cached in |
| Modifier and Type | Field and Description |
|---|---|
| private final AdvisedSupport | advised
Config used to configure this proxy. |
| private transient JdkDynamicAopProxy. | cache
Cached in |
| private static final String | |
| private static final Log | logger
We use a static Log to avoid serialization issues. |
| private static final long | serialVersionUID
use serialVersionUID from Spring 1.2 for interoperability. |
| Access | Constructor and Description |
|---|---|
| public | JdkDynamicAopProxy(AdvisedSupport
the AOP configuration as AdvisedSupport object config)Construct a new JdkDynamicAopProxy for the given AOP configuration. |
| Modifier and Type | Method and Description |
|---|---|
| private ClassLoader | determineClassLoader(ClassLoader classLoader)
Determine whether the JDK bootstrap or platform loader has been suggested -> use higher-level loader which can see Spring infrastructure classes instead. |
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. |
| public Object | getProxy()
Implements org. |
| public Object | getProxy(ClassLoader
the class loader to create the proxy with
(or classLoader)null for the low-level proxy facility's default)Implements org. |
| public Class | getProxyClass(ClassLoader
the class loader to create the proxy class with
(or classLoader)null for the low-level proxy facility's default)Implements org. |
| public int | |
| public Object | invoke(Object
the proxy instance that the method was invoked on proxy, Method the method, Object[] Method instance corresponding to
the interface method invoked on the proxy instance. The declaring
class of the Method object will be the interface that
the method was declared in, which may be a superinterface of the
proxy interface that the proxy class inherits the method through.an array of objects containing the values of the
arguments passed in the method invocation on the proxy instance,
or args)null if interface method takes no arguments.
Arguments of primitive types are wrapped in instances of the
appropriate primitive wrapper class, such as
java.lang.Integer or java.lang.Boolean.Implements java. InvocationHandler.invoke.
|
| private void |
| advised | back to summary |
|---|---|
| private final AdvisedSupport advised Config used to configure this proxy. | |
| cache | back to summary |
|---|---|
| private transient JdkDynamicAopProxy. Cached in | |
| COROUTINES_FLOW_CLASS_NAME | back to summary |
|---|---|
| private static final String COROUTINES_FLOW_CLASS_NAME | |
| logger | back to summary |
|---|---|
| private static final Log logger We use a static Log to avoid serialization issues. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID use serialVersionUID from Spring 1.2 for interoperability. | |
| JdkDynamicAopProxy | back to summary |
|---|---|
| public JdkDynamicAopProxy(AdvisedSupport config) throws AopConfigException Construct a new JdkDynamicAopProxy for the given AOP configuration.
| |
| determineClassLoader | back to summary |
|---|---|
| private ClassLoader determineClassLoader(ClassLoader classLoader) Determine whether the JDK bootstrap or platform loader has been suggested -> use higher-level loader which can see Spring infrastructure classes instead. | |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. 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.
| |
| getProxy | back to summary |
|---|---|
| public Object getProxy() Implements org. Doc from org. Create a new proxy object. Uses the AopProxy's default class loader (if necessary for proxy creation): usually, the thread context class loader. | |
| getProxy | back to summary |
|---|---|
| public Object getProxy(ClassLoader classLoader) Implements org. Doc from org. Create a new proxy object. Uses the given class loader (if necessary for proxy creation).
| |
| getProxyClass | back to summary |
|---|---|
| public Class Implements org. Doc from org. Determine the proxy class.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Proxy uses the hash code of the TargetSource.
| |
| invoke | back to summary |
|---|---|
| public Object invoke(Object proxy, Method method, Object[] args) throws Throwable Implements java. Implementation of Callers will see exactly the exception thrown by the target, unless a hook method throws an exception.
| |
| readObject | back to summary |
|---|---|
| private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException | |
AdvisedSupport#proxyMetadataCache.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final boolean | |
| pack-priv final boolean | |
| pack-priv final Class |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| equalsDefined | back to summary |
|---|---|
| pack-priv final boolean equalsDefined | |
| hashCodeDefined | back to summary |
|---|---|
| pack-priv final boolean hashCodeDefined | |
| proxiedInterfaces | back to summary |
|---|---|
| pack-priv final Class<?>[] proxiedInterfaces | |
| ProxiedInterfacesCache | back to summary |
|---|---|
| pack-priv ProxiedInterfacesCache(AdvisedSupport config) | |