Mainly for internal use within the AOP framework.
See org. for a collection of
generic AOP utility methods which do not depend on AOP framework internals.
org.springframework.aop.support.AopUtils
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static Object[] | Returns: a cloned argument array, or the original if no adaptation is neededthe target method method, Object[] the given arguments arguments)Adapt the given arguments to the target signature in the given method, if necessary: in particular, if a given vararg argument array does not match the array type of the declared vararg parameter in the method. |
| public static Class | Returns: the complete set of interfaces that the proxy should implementthe set of user-specified interfaces implemented by
the component to be proxied userInterfaces)Complete the set of interfaces that are typically required in a JDK dynamic proxy generated by Spring AOP. |
| public static Class | Returns: the complete set of interfaces to proxythe proxy config advised)Determine the complete set of interfaces to proxy for the given AOP configuration. |
| pack-priv static Class | Returns: the complete set of interfaces to proxythe proxy config advised, boolean whether to expose the decoratingProxy)DecoratingProxy interfaceDetermine the complete set of interfaces to proxy for the given AOP configuration. |
| public static boolean | equalsAdvisors(AdvisedSupport a, AdvisedSupport b)
Check equality of the advisors behind the given AdvisedSupport objects. |
| public static boolean | equalsInProxy(AdvisedSupport a, AdvisedSupport b)
Check equality of the proxies behind the given AdvisedSupport objects. |
| public static boolean | equalsProxiedInterfaces(AdvisedSupport a, AdvisedSupport b)
Check equality of the proxied interfaces behind the given AdvisedSupport objects. |
| public static Object | Returns: the singleton target object managed in aSingletonTargetSource,
or null in any other case (not a proxy, not an existing singleton target)the (potential) proxy to check candidate)Obtain the singleton target object behind the given proxy, if any. |
| public static Class | Returns: all user-specified interfaces that the proxy implements, in the original order (nevernull or empty)the proxy to analyze (usually a JDK dynamic proxy) proxy)Extract the user-specified interfaces that the given proxy implements, i.e. all non-Advised interfaces that the proxy implements. |
| public static Class | Returns: the ultimate target class (or the plain class of the given object as fallback; nevernull)the instance to check (might be an AOP proxy) 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. |
| AopProxyUtils | back to summary |
|---|---|
| public AopProxyUtils() | |
| adaptArgumentsIfNecessary | back to summary |
|---|---|
| pack-priv static Object[] adaptArgumentsIfNecessary(Method method, Object[] arguments) Adapt the given arguments to the target signature in the given method, if necessary: in particular, if a given vararg argument array does not match the array type of the declared vararg parameter in the method. | |
| completeJdkProxyInterfaces | back to summary |
|---|---|
| public static Class Complete the set of interfaces that are typically required in a JDK dynamic proxy generated by Spring AOP. Specifically, This method can be useful when registering
proxy hints for Spring's
AOT support, as demonstrated in the following example which uses this method
via a RuntimeHints hints = ... hints.proxies().registerJdkProxy(completeJdkProxyInterfaces(MyInterface.class));
| |
| completeProxiedInterfaces | back to summary |
|---|---|
| public static Class Determine the complete set of interfaces to proxy for the given AOP configuration. This will always add the
| |
| completeProxiedInterfaces | back to summary |
|---|---|
| pack-priv static Class Determine the complete set of interfaces to proxy for the given AOP configuration. This will always add the
| |
| equalsAdvisors | back to summary |
|---|---|
| public static boolean equalsAdvisors(AdvisedSupport a, AdvisedSupport b) Check equality of the advisors behind the given AdvisedSupport objects. | |
| equalsInProxy | back to summary |
|---|---|
| public static boolean equalsInProxy(AdvisedSupport a, AdvisedSupport b) Check equality of the proxies behind the given AdvisedSupport objects. Not the same as equality of the AdvisedSupport objects: rather, equality of interfaces, advisors and target sources. | |
| equalsProxiedInterfaces | back to summary |
|---|---|
| public static boolean equalsProxiedInterfaces(AdvisedSupport a, AdvisedSupport b) Check equality of the proxied interfaces behind the given AdvisedSupport objects. | |
| getSingletonTarget | back to summary |
|---|---|
| public static Object getSingletonTarget(Object candidate) Obtain the singleton target object behind the given proxy, if any.
| |
| proxiedUserInterfaces | back to summary |
|---|---|
| public static Class Extract the user-specified interfaces that the given proxy implements, i.e. all non-Advised interfaces that the proxy implements. | |
| ultimateTargetClass | back to summary |
|---|---|
| public static Class 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.
| |