The Spring Framework

org.springframework.aop.support
Class ComposablePointcut

java.lang.Object
  extended by org.springframework.aop.support.ComposablePointcut
All Implemented Interfaces:
Serializable, Pointcut

public class ComposablePointcut
extends Object
implements 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);

There is no union(Pointcut, Pointcut) method on this class. Use the Pointcuts.union method for this.

Since:
11.11.2003
Author:
Rod Johnson, Rob Harrop, Juergen Hoeller
See Also:
Pointcuts.union(org.springframework.aop.Pointcut, org.springframework.aop.Pointcut), Serialized Form

Field Summary
 
Fields inherited from interface org.springframework.aop.Pointcut
TRUE
 
Constructor Summary
ComposablePointcut()
          Create a default ComposablePointcut, with ClassFilter.TRUE and MethodMatcher.TRUE.
ComposablePointcut(ClassFilter classFilter)
          Create a ComposablePointcut for the given ClassFilter, with MethodMatcher.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, with ClassFilter.TRUE.
 
Method Summary
 boolean equals(Object other)
           
 ClassFilter getClassFilter()
          Return the ClassFilter for this pointcut.
 MethodMatcher getMethodMatcher()
          Return the MethodMatcher for this pointcut.
 int hashCode()
           
 ComposablePointcut intersection(ClassFilter filter)
           
 ComposablePointcut intersection(MethodMatcher mm)
           
 ComposablePointcut intersection(Pointcut other)
           
 String toString()
           
 ComposablePointcut union(ClassFilter filter)
           
 ComposablePointcut union(MethodMatcher mm)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ComposablePointcut

public ComposablePointcut()
Create a default ComposablePointcut, with ClassFilter.TRUE and MethodMatcher.TRUE.


ComposablePointcut

public ComposablePointcut(ClassFilter classFilter)
Create a ComposablePointcut for the given ClassFilter, with MethodMatcher.TRUE.

Parameters:
classFilter - the ClassFilter to use

ComposablePointcut

public ComposablePointcut(MethodMatcher methodMatcher)
Create a ComposablePointcut for the given MethodMatcher, with ClassFilter.TRUE.

Parameters:
methodMatcher - the MethodMatcher to use

ComposablePointcut

public ComposablePointcut(ClassFilter classFilter,
                          MethodMatcher methodMatcher)
Create a ComposablePointcut for the given ClassFilter and MethodMatcher.

Parameters:
classFilter - the ClassFilter to use
methodMatcher - the MethodMatcher to use
Method Detail

union

public ComposablePointcut union(ClassFilter filter)

intersection

public ComposablePointcut intersection(ClassFilter filter)

union

public ComposablePointcut union(MethodMatcher mm)

intersection

public ComposablePointcut intersection(MethodMatcher mm)

intersection

public ComposablePointcut intersection(Pointcut other)

getClassFilter

public ClassFilter getClassFilter()
Description copied from interface: Pointcut
Return the ClassFilter for this pointcut.

Specified by:
getClassFilter in interface Pointcut

getMethodMatcher

public MethodMatcher getMethodMatcher()
Description copied from interface: Pointcut
Return the MethodMatcher for this pointcut.

Specified by:
getMethodMatcher in interface Pointcut

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

The Spring Framework

Copyright © 2002-2007 The Spring Framework.