类 AopProxyUtils


  • public abstract class AopProxyUtils
    extends Object
    Utility methods for AOP proxy factories. Mainly for internal use within the AOP framework.

    See AopUtils for a collection of generic AOP utility methods which do not depend on AOP framework internals.

    作者:
    Rod Johnson, Juergen Hoeller
    另请参阅:
    AopUtils
    • 方法详细资料

      • ultimateTargetClass

        public static Class<?> ultimateTargetClass​(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.
        参数:
        candidate - the instance to check (might be an AOP proxy)
        返回:
        the ultimate target class (or the plain class of the given object as fallback; never null)
        另请参阅:
        TargetClassAware.getTargetClass(), Advised.getTargetSource()
      • proxiedUserInterfaces

        public static Class<?>[] proxiedUserInterfaces​(Object proxy)
        Extract the user-specified interfaces that the given proxy implements, i.e. all non-Advised interfaces that the proxy implements.
        参数:
        proxy - the proxy to analyze (usually a JDK dynamic proxy)
        返回:
        all user-specified interfaces that the proxy implements, in the original order (never null or empty)
        另请参阅:
        Advised
      • equalsInProxy

        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.