| java.lang.Object org.springframework.aop.support.AopUtils
Method Summary | |
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(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) 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(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. | 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. | public static Class | getTargetClass(Object candidate) Determine the target class of the given bean instance,
which might be an AOP proxy. | public static Object | invokeJoinpointUsingReflection(Object target, Method method, Object[] args) 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 | 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. |
canApply | public static boolean canApply(Pointcut pc, Class targetClass)(Code) | | 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.
Parameters: pc - the static or dynamic pointcut to check Parameters: targetClass - the class to test whether the pointcut can apply on any method |
canApply | public static boolean canApply(Pointcut pc, Class targetClass, boolean hasIntroductions)(Code) | | 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.
Parameters: pc - the static or dynamic pointcut to check Parameters: targetClass - the class to test Parameters: hasIntroductions - whether or not the advisor chainfor this bean includes any introductions whether the pointcut can apply on any method |
canApply | public static boolean canApply(Advisor advisor, Class targetClass)(Code) | | 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.
Parameters: advisor - the advisor to check Parameters: targetClass - class we're testing whether the pointcut can apply on any method |
canApply | public static boolean canApply(Advisor advisor, Class targetClass, boolean hasIntroductions)(Code) | | 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
Parameters: advisor - the advisor to check Parameters: targetClass - class we're testing Parameters: hasIntroductions - whether or not the advisor chain for this bean includesany introductions whether the pointcut can apply on any method |
findAdvisorsThatCanApply | public static List findAdvisorsThatCanApply(List candidateAdvisors, Class clazz)(Code) | | Determine the sublist of the candidateAdvisors list
that is applicable to the given class.
Parameters: candidateAdvisors - the Advisors to evaluate Parameters: clazz - the target class sublist of Advisors that can apply to an object of the given class(may be the incoming List as-is) |
getMostSpecificMethod | public static Method getMostSpecificMethod(Method method, Class targetClass)(Code) | | 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.
Parameters: method - the method to be invoked, which may come from an interface Parameters: targetClass - the target class for the current invocation.May be null or may not even implement the method. the specific target method, or the original method if thetargetClass doesn't implement it or is null See Also: org.springframework.util.ClassUtils.getMostSpecificMethod |
getTargetClass | public static Class getTargetClass(Object candidate)(Code) | | 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.
Parameters: candidate - the instance to check (might be an AOP proxy) the target class (or the plain class of the given object as fallback) See Also: org.springframework.aop.TargetClassAware.getTargetClass |
invokeJoinpointUsingReflection | public static Object invokeJoinpointUsingReflection(Object target, Method method, Object[] args) throws Throwable(Code) | | Invoke the given target via reflection, as part of an AOP method invocation.
Parameters: target - the target object Parameters: method - the method to invoke Parameters: args - the arguments for the method the invocation result, if any throws: Throwable - if thrown by the target method throws: org.springframework.aop.AopInvocationException - in case of a reflection error |
isCglibProxy | public static boolean isCglibProxy(Object object)(Code) | | Check whether the given object is a CGLIB proxy.
Parameters: object - the object to check |
isCglibProxyClass | public static boolean isCglibProxyClass(Class clazz)(Code) | | Check whether the specified class is a CGLIB-generated class.
Parameters: clazz - the class to check |
|
|