spring-framework / org.springframework.aop.support / ComposablePointcut

ComposablePointcut

open class ComposablePointcut : Pointcut, Serializable

Convenient class for building up pointcuts. All methods return ComposablePointcut, so we can use a concise idiom like: Pointcut pc = new ComposablePointcut().union(classFilter).intersection(methodMatcher).intersection(pointcut);

Author
Rod Johnson

Author
Juergen Hoeller

Author
Rob Harrop

Since
11.11.2003

See Also
Pointcuts

Constructors

<init>

ComposablePointcut()

Create a default ComposablePointcut, with ClassFilter.TRUE and MethodMatcher.TRUE.

ComposablePointcut(pointcut: Pointcut)

Create a ComposablePointcut based on the given Pointcut.

ComposablePointcut(classFilter: ClassFilter)

Create a ComposablePointcut for the given ClassFilter, with MethodMatcher.TRUE.

ComposablePointcut(methodMatcher: MethodMatcher)

Create a ComposablePointcut for the given MethodMatcher, with ClassFilter.TRUE.

ComposablePointcut(classFilter: ClassFilter, methodMatcher: MethodMatcher)

Create a ComposablePointcut for the given ClassFilter and MethodMatcher.

Functions

equals

open fun equals(other: Any?): Boolean

getClassFilter

open fun getClassFilter(): ClassFilter

getMethodMatcher

open fun getMethodMatcher(): MethodMatcher

hashCode

open fun hashCode(): Int

intersection

open fun intersection(other: ClassFilter): ComposablePointcut

Apply an intersection with the given ClassFilter.

open fun intersection(other: MethodMatcher): ComposablePointcut

Apply an intersection with the given MethodMatcher.

open fun intersection(other: Pointcut): ComposablePointcut

Apply an intersection with the given Pointcut.

toString

open fun toString(): String

union

open fun union(other: ClassFilter): ComposablePointcut

Apply a union with the given ClassFilter.

open fun union(other: MethodMatcher): ComposablePointcut

Apply a union with the given MethodMatcher.

open fun union(other: Pointcut): ComposablePointcut

Apply 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.