Class ComposablePointcut
java.lang.Object
org.springframework.aop.support.ComposablePointcut
- All Implemented Interfaces:
- Serializable, Pointcut
Convenient class for building up pointcuts.
All methods return ComposablePointcut, so we can use concise idioms
like in the following example.
Pointcut pc = new ComposablePointcut()
                     .union(classFilter)
                     .intersection(methodMatcher)
                     .intersection(pointcut);- Since:
- 11.11.2003
- Author:
- Rod Johnson, Juergen Hoeller, Rob Harrop
- See Also:
- 
Field Summary
- 
Constructor SummaryConstructorsConstructorDescriptionCreate a default ComposablePointcut, withClassFilter.TRUEandMethodMatcher.TRUE.ComposablePointcut(ClassFilter classFilter) Create a ComposablePointcut for the given ClassFilter, withMethodMatcher.TRUE.ComposablePointcut(ClassFilter classFilter, MethodMatcher methodMatcher) Create a ComposablePointcut for the given ClassFilter and MethodMatcher.ComposablePointcut(MethodMatcher methodMatcher) Create a ComposablePointcut for the given MethodMatcher, withClassFilter.TRUE.ComposablePointcut(Pointcut pointcut) Create a ComposablePointcut based on the given Pointcut.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanReturn the ClassFilter for this pointcut.Return the MethodMatcher for this pointcut.inthashCode()intersection(ClassFilter other) Apply an intersection with the given ClassFilter.intersection(MethodMatcher other) Apply an intersection with the given MethodMatcher.intersection(Pointcut other) Apply an intersection with the given Pointcut.toString()union(ClassFilter other) Apply a union with the given ClassFilter.union(MethodMatcher other) Apply a union with the given MethodMatcher.Apply a union with the given Pointcut.
- 
Constructor Details- 
ComposablePointcutpublic ComposablePointcut()Create a default ComposablePointcut, withClassFilter.TRUEandMethodMatcher.TRUE.
- 
ComposablePointcutCreate a ComposablePointcut based on the given Pointcut.- Parameters:
- pointcut- the original Pointcut
 
- 
ComposablePointcutCreate a ComposablePointcut for the given ClassFilter, withMethodMatcher.TRUE.- Parameters:
- classFilter- the ClassFilter to use
 
- 
ComposablePointcutCreate a ComposablePointcut for the given MethodMatcher, withClassFilter.TRUE.- Parameters:
- methodMatcher- the MethodMatcher to use
 
- 
ComposablePointcutCreate a ComposablePointcut for the given ClassFilter and MethodMatcher.- Parameters:
- classFilter- the ClassFilter to use
- methodMatcher- the MethodMatcher to use
 
 
- 
- 
Method Details- 
unionApply a union with the given ClassFilter.- Parameters:
- other- the ClassFilter to apply a union with
- Returns:
- this composable pointcut (for call chaining)
 
- 
intersectionApply an intersection with the given ClassFilter.- Parameters:
- other- the ClassFilter to apply an intersection with
- Returns:
- this composable pointcut (for call chaining)
 
- 
unionApply a union with the given MethodMatcher.- Parameters:
- other- the MethodMatcher to apply a union with
- Returns:
- this composable pointcut (for call chaining)
 
- 
intersectionApply an intersection with the given MethodMatcher.- Parameters:
- other- the MethodMatcher to apply an intersection with
- Returns:
- this composable pointcut (for call chaining)
 
- 
unionApply a union with the given Pointcut.Note that for a Pointcut union, methods will only match if their original ClassFilter (from the originating Pointcut) matches as well. MethodMatchers and ClassFilters from different Pointcuts will never get interleaved with each other. - Parameters:
- other- the Pointcut to apply a union with
- Returns:
- this composable pointcut (for call chaining)
 
- 
intersectionApply an intersection with the given Pointcut.- Parameters:
- other- the Pointcut to apply an intersection with
- Returns:
- this composable pointcut (for call chaining)
 
- 
getClassFilterDescription copied from interface:PointcutReturn the ClassFilter for this pointcut.- Specified by:
- getClassFilterin interface- Pointcut
- Returns:
- the ClassFilter (never null)
 
- 
getMethodMatcherDescription copied from interface:PointcutReturn the MethodMatcher for this pointcut.- Specified by:
- getMethodMatcherin interface- Pointcut
- Returns:
- the MethodMatcher (never null)
 
- 
equals
- 
hashCode
- 
toString
 
-