Save This Page
Home » spring-framework-2.5.6-with-dependencies » org.springframework » aop » support » [javadoc | source]
org.springframework.aop.support
abstract public class: AopUtils [javadoc | source]
java.lang.Object
   org.springframework.aop.support.AopUtils
Utility methods for AOP support code. Mainly for internal use within Spring's AOP support.

See org.springframework.aop.framework.AopProxyUtils for a collection of framework-specific AOP utility methods which depend on internals of Spring's AOP framework implementation.

Method from org.springframework.aop.support.AopUtils Summary:
canApply,   canApply,   canApply,   canApply,   findAdvisorsThatCanApply,   getMostSpecificMethod,   getTargetClass,   invokeJoinpointUsingReflection,   isAopProxy,   isCglibProxy,   isCglibProxyClass,   isEqualsMethod,   isFinalizeMethod,   isHashCodeMethod,   isJdkDynamicProxy,   isToStringMethod
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.aop.support.AopUtils Detail:
 public static boolean canApply(Pointcut pc,
    Class targetClass) 
    Can the given pointcut apply at all on the given class?

    This is an important test as it can be used to optimize out a pointcut for a class.

 public static boolean canApply(Advisor advisor,
    Class targetClass) 
    Can the given advisor apply at all on the given class? This is an important test as it can be used to optimize out a advisor for a class.
 public static boolean canApply(Pointcut pc,
    Class targetClass,
    boolean hasIntroductions) 
    Can the given pointcut apply at all on the given class?

    This is an important test as it can be used to optimize out a pointcut for a class.

 public static boolean canApply(Advisor advisor,
    Class targetClass,
    boolean hasIntroductions) 
    Can the given advisor apply at all on the given class?

    This is an important test as it can be used to optimize out a advisor for a class. This version also takes into account introductions (for IntroductionAwareMethodMatchers).

 public static List findAdvisorsThatCanApply(List candidateAdvisors,
    Class clazz) 
    Determine the sublist of the candidateAdvisors list that is applicable to the given class.
 public static Method getMostSpecificMethod(Method method,
    Class targetClass) 
    Given a method, which may come from an interface, and a target class used in the current AOP invocation, find the corresponding target method if there is one. E.g. the method may be IFoo.bar() and the target class may be DefaultFoo. In this case, the method may be DefaultFoo.bar(). This enables attributes on that method to be found.

    NOTE: In contrast to org.springframework.util.ClassUtils#getMostSpecificMethod , this method resolves Java 5 bridge methods in order to retrieve attributes from the original method definition.

 public static Class getTargetClass(Object candidate) 
    Determine the target class of the given bean instance, which might be an AOP proxy.

    Returns the target class for an AOP proxy and the plain class else.

 public static Object invokeJoinpointUsingReflection(Object target,
    Method method,
    Object[] args) throws Throwable 
    Invoke the given target via reflection, as part of an AOP method invocation.
 public static boolean isAopProxy(Object object) 
    Check whether the given object is a JDK dynamic proxy or a CGLIB proxy.
 public static boolean isCglibProxy(Object object) 
    Check whether the given object is a CGLIB proxy.
 public static boolean isCglibProxyClass(Class clazz) 
    Check whether the specified class is a CGLIB-generated class.
 public static boolean isEqualsMethod(Method method) 
    Determine whether the given method is an "equals" method.
 public static boolean isFinalizeMethod(Method method) 
    Determine whether the given method is a "finalize" method.
 public static boolean isHashCodeMethod(Method method) 
    Determine whether the given method is a "hashCode" method.
 public static boolean isJdkDynamicProxy(Object object) 
    Check whether the given object is a JDK dynamic proxy.
 public static boolean isToStringMethod(Method method) 
    Determine whether the given method is a "toString" method.