public abstract class AopProxyUtils
extends java.lang.Object
See AopUtils for a collection of
generic AOP utility methods which do not depend on AOP framework internals.
AopUtils| Constructor and Description |
|---|
AopProxyUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Class<?>[] |
completeProxiedInterfaces(AdvisedSupport advised)
Determine the complete set of interfaces to proxy for the given AOP configuration.
|
static boolean |
equalsAdvisors(AdvisedSupport a,
AdvisedSupport b)
Check equality of the advisors behind the given AdvisedSupport objects.
|
static boolean |
equalsInProxy(AdvisedSupport a,
AdvisedSupport b)
Check equality of the proxies behind the given AdvisedSupport objects.
|
static boolean |
equalsProxiedInterfaces(AdvisedSupport a,
AdvisedSupport b)
Check equality of the proxied interfaces behind the given AdvisedSupport objects.
|
static java.lang.Object |
getSingletonTarget(java.lang.Object candidate)
Obtain the singleton target object behind the given proxy, if any.
|
static java.lang.Class<?>[] |
proxiedUserInterfaces(java.lang.Object proxy)
Extract the user-specified interfaces that the given proxy implements,
i.e.
|
static java.lang.Class<?> |
ultimateTargetClass(java.lang.Object candidate)
Determine the ultimate target class of the given bean instance, traversing
not only a top-level proxy but any number of nested proxies as well —
as long as possible without side effects, that is, just for singleton targets.
|
public static java.lang.Object getSingletonTarget(java.lang.Object candidate)
candidate - the (potential) proxy to checkSingletonTargetSource,
or null in any other case (not a proxy, not an existing singleton target)Advised.getTargetSource(),
SingletonTargetSource.getTarget()public static java.lang.Class<?> ultimateTargetClass(java.lang.Object candidate)
candidate - the instance to check (might be an AOP proxy)null)TargetClassAware.getTargetClass(),
Advised.getTargetSource()public static java.lang.Class<?>[] completeProxiedInterfaces(AdvisedSupport advised)
This will always add the Advised interface unless the AdvisedSupport's
"opaque" flag is on. Always adds the
SpringProxy marker interface.
advised - the proxy configSpringProxy,
Advisedpublic static java.lang.Class<?>[] proxiedUserInterfaces(java.lang.Object proxy)
proxy - the proxy to analyze (usually a JDK dynamic proxy)null or empty)Advisedpublic static boolean equalsInProxy(AdvisedSupport a, AdvisedSupport b)
public static boolean equalsProxiedInterfaces(AdvisedSupport a, AdvisedSupport b)
public static boolean equalsAdvisors(AdvisedSupport a, AdvisedSupport b)