Interface ClassFilter
- All Known Implementing Classes:
AnnotationClassFilter, AspectJExpressionPointcut, ControlFlowPointcut, DefaultIntroductionAdvisor, RootClassFilter, TypePatternClassFilter
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Filter that restricts matching of a pointcut or introduction to a given set
of target classes.
Can be used as part of a Pointcut or for the entire targeting of
an IntroductionAdvisor.
WARNING: Concrete implementations of this interface must
provide proper implementations of Object.equals(Object),
Object.hashCode(), and Object.toString() in order to allow the
filter to be used in caching scenarios — for example, in proxies generated
by CGLIB. As of Spring Framework 6.0.13, the toString() implementation
must generate a unique string representation that aligns with the logic used
to implement equals(). See concrete implementations of this interface
within the framework for examples.
- Author:
- Rod Johnson, Sam Brannen
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ClassFilterCanonical instance of aClassFilterthat matches all classes. -
Method Summary
-
Field Details
-
TRUE
Canonical instance of aClassFilterthat matches all classes.
-
-
Method Details
-
matches
Should the pointcut apply to the given interface or target class?- Parameters:
clazz- the candidate target class- Returns:
- whether the advice should apply to the given target class
-