org.springframework.aop.aspectj.annotation
Class InstantiationModelAwarePointcutAdvisorImpl.PerTargetInstantiationModelPointcut
java.lang.Object
org.springframework.aop.support.DynamicMethodMatcher
org.springframework.aop.support.DynamicMethodMatcherPointcut
org.springframework.aop.aspectj.annotation.InstantiationModelAwarePointcutAdvisorImpl.PerTargetInstantiationModelPointcut
- All Implemented Interfaces:
- MethodMatcher, Pointcut
- Enclosing class:
- InstantiationModelAwarePointcutAdvisorImpl
private class InstantiationModelAwarePointcutAdvisorImpl.PerTargetInstantiationModelPointcut
- extends DynamicMethodMatcherPointcut
Pointcut implementation that changes its behaviour when the advice is instantiated.
Note that this is a dynamic pointcut. Otherwise it might
be optimized out if it does not at first match statically.
Fields inherited from interface org.springframework.aop.Pointcut |
TRUE |
Method Summary |
private boolean |
isAspectMaterialized()
|
boolean |
matches(java.lang.reflect.Method method,
java.lang.Class targetClass)
Can override to add preconditions for dynamic matching. |
boolean |
matches(java.lang.reflect.Method method,
java.lang.Class targetClass,
java.lang.Object[] args)
Check whether there a runtime (dynamic) match for this method,
which must have matched statically. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
declaredPointcut
private final AspectJExpressionPointcut declaredPointcut
preInstantiationPointcut
private final Pointcut preInstantiationPointcut
aspectInstanceFactory
private LazySingletonAspectInstanceFactoryDecorator aspectInstanceFactory
InstantiationModelAwarePointcutAdvisorImpl.PerTargetInstantiationModelPointcut
private InstantiationModelAwarePointcutAdvisorImpl.PerTargetInstantiationModelPointcut(AspectJExpressionPointcut declaredPointcut,
Pointcut preInstantiationPointcut,
MetadataAwareAspectInstanceFactory aspectInstanceFactory)
matches
public boolean matches(java.lang.reflect.Method method,
java.lang.Class targetClass)
- Description copied from class:
DynamicMethodMatcher
- Can override to add preconditions for dynamic matching. This implementation
always returns true.
- Specified by:
matches
in interface MethodMatcher
- Overrides:
matches
in class DynamicMethodMatcher
- Parameters:
method
- the candidate methodtargetClass
- the target class (may be null
, in which case
the candidate class must be taken to be the method's declaring class)
- Returns:
- whether or not this method matches statically
matches
public boolean matches(java.lang.reflect.Method method,
java.lang.Class targetClass,
java.lang.Object[] args)
- Description copied from interface:
MethodMatcher
- Check whether there a runtime (dynamic) match for this method,
which must have matched statically.
This method is invoked only if the 2-arg matches method returns
true
for the given method and target class, and if the
MethodMatcher.isRuntime()
method returns true
. Invoked
immediately before potential running of the advice, after any
advice earlier in the advice chain has run.
- Parameters:
method
- the candidate methodtargetClass
- the target class (may be null
, in which case
the candidate class must be taken to be the method's declaring class)args
- arguments to the method
- Returns:
- whether there's a runtime match
- See Also:
MethodMatcher.matches(Method, Class)
isAspectMaterialized
private boolean isAspectMaterialized()