abstract class 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.
Author
Rod Johnson
Author
Juergen Hoeller
Author
Rob Harrop
See Also
org.springframework.aop.framework.AopProxyUtils
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. |
open static fun canApply(pc: Pointcut, targetClass: Class<*>): Booleanopen static fun canApply(pc: Pointcut, targetClass: Class<*>, hasIntroductions: Boolean): Boolean
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. open static fun canApply(advisor: Advisor, targetClass: Class<*>): Boolean
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. open static fun canApply(advisor: Advisor, targetClass: Class<*>, hasIntroductions: Boolean): Boolean
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). |
|
open static fun findAdvisorsThatCanApply(candidateAdvisors: MutableList<Advisor>, clazz: Class<*>): MutableList<Advisor>
Determine the sublist of the |
|
open static fun getMostSpecificMethod(method: Method, targetClass: Class<*>): Method
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 NOTE: In contrast to |
|
open static fun getTargetClass(candidate: Any): Class<*>
Determine the target class of the given bean instance which might be an AOP proxy. Returns the target class for an AOP proxy or the plain class otherwise. |
|
open static fun invokeJoinpointUsingReflection(target: Any, method: Method, args: Array<Any>): Any
Invoke the given target via reflection, as part of an AOP method invocation. |
|
open static fun isAopProxy(object: Any): Boolean
Check whether the given object is a JDK dynamic proxy or a CGLIB proxy. This method additionally checks if the given object is an instance of SpringProxy. |
|
open static fun isCglibProxy(object: Any): Boolean
Check whether the given object is a CGLIB proxy. This method goes beyond the implementation of |
|
open static fun isEqualsMethod(method: Method): Boolean
Determine whether the given method is an "equals" method. |
|
open static fun isFinalizeMethod(method: Method): Boolean
Determine whether the given method is a "finalize" method. |
|
open static fun isHashCodeMethod(method: Method): Boolean
Determine whether the given method is a "hashCode" method. |
|
open static fun isJdkDynamicProxy(object: Any): Boolean
Check whether the given object is a JDK dynamic proxy. This method goes beyond the implementation of |
|
open static fun isToStringMethod(method: Method): Boolean
Determine whether the given method is a "toString" method. |
|
open static fun selectInvocableMethod(method: Method, targetType: Class<*>): Method
Select an invocable method on the target type: either the given method itself if actually exposed on the target type, or otherwise a corresponding method on one of the target type's interfaces or on the target type itself. |