|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PointcutsFactory
Produces pointcuts.
Method Summary | |
---|---|
ClassPointcut |
allClasses()
Returns a class pointcut that picks all classes. |
MethodPointcut |
allMethods()
Returns a pointcut that matches all methods. |
ClassPointcut |
className(String regex)
Returns a class pointcut that matches class names with a regular expression. |
ComponentPointcut |
component(Object componentKey)
Returns a component pointcut that picks one component key. |
ComponentPointcut |
componentName(String regex)
Returns a component pointcut that matches component keys with a regular expression. |
MethodPointcut |
declaringClass(ClassPointcut classPointcut)
Returns a method pointcut that picks a method if the given class pointcut picks the method's declaring class. |
MethodPointcut |
getMethods()
Returns a pointcut that matches get methods. |
ClassPointcut |
instancesOf(Class type)
Returns a class pointcut that picks all instances of a given type. |
ClassPointcut |
intersection(ClassPointcut a,
ClassPointcut b)
Returns a class pointcut that is the intersection of two class pointcuts. |
MethodPointcut |
intersection(MethodPointcut a,
MethodPointcut b)
Returns a method pointcut that is the intersection of two other method pointcuts. |
MethodPointcut |
isMethods()
Returns a pointcut that matches is methods. |
MethodPointcut |
membersOf(Class clazz)
Picks methods that are members of the given class (even if the method was declared in a super class of the given class). |
ClassPointcut |
not(ClassPointcut classPointcut)
Returns a class pointcut that inverts the original pointcut. |
MethodPointcut |
not(MethodPointcut methodPointcut)
Creates a method pointcut that inverts the original pointcut. |
MethodPointcut |
objectMethods()
Returns a method pointcut that picks equals ,
hashCode , and toString . |
ClassPointcut |
oneClass(Class clazz)
Returns a class pointcut that picks one class. |
MethodPointcut |
oneMethod(Method method)
Returns a pointcut that matches one method. |
ClassPointcut |
packageName(String packageName)
Returns a class pointcut that picks all classes in a package. |
MethodPointcut |
returnType(ClassPointcut classPointcut)
Returns a method pointcut that picks a method if the given class pointcut picks the method's return type. |
MethodPointcut |
setMethods()
Returns a method pointcut that matches set methods. |
MethodPointcut |
signature(String regexp)
Returns a method pointcut that matches the method signatures with a regular expression. |
ClassPointcut |
union(ClassPointcut a,
ClassPointcut b)
Returns a pointcut that is the union of two class pointcuts. |
MethodPointcut |
union(MethodPointcut a,
MethodPointcut b)
Returns a method pointcut that is the union of two other method pointcuts. |
Method Detail |
---|
ComponentPointcut component(Object componentKey)
componentKey
- the component key to match against.
ComponentPointcut
that matches
componentKey
.ComponentPointcut componentName(String regex) throws MalformedRegularExpressionException
regex
- the regular expression to match against.
ComponentPointcut
that matches the component key
against regex
.
MalformedRegularExpressionException
- if the regular expression is
invalid.ClassPointcut allClasses()
ClassPointcut
that matches all classes.ClassPointcut instancesOf(Class type)
type
- the base interface or class.
ClassPointcut
that matches instances of
type
.ClassPointcut className(String regex) throws MalformedRegularExpressionException
regex
- the regular expression to match against.
ClassPointcut
that matches the class name
against regex
.
MalformedRegularExpressionException
- if the regular expression is
invalid.ClassPointcut oneClass(Class clazz)
clazz
- the class to match against.
ClassPointcut
that matches clazz
.ClassPointcut packageName(String packageName)
packageName
argument is not a regular expression; the
returned pointcut expects an exact match against the package name.
packageName
- the package name to match against the package of the
candidate component's class.
ClassPointcut
that matches the class package
with packageName
.ClassPointcut intersection(ClassPointcut a, ClassPointcut b)
a
- the first ClassPointcut
.b
- the second ClassPointcut
.
ClassPointcut
that is the intersection of
a
and b
.ClassPointcut union(ClassPointcut a, ClassPointcut b)
a
- the first ClassPointcut
.b
- the second ClassPointcut
.
ClassPointcut
that is the union of
a
and b
.ClassPointcut not(ClassPointcut classPointcut)
classPointcut
- the pointcut to negate.
ClassPointcut
that inverts
classPointcut
.MethodPointcut allMethods()
MethodPointcut
that matches all methods.MethodPointcut getMethods()
MethodPointcut
that matches get methods.MethodPointcut isMethods()
MethodPointcut
that matches is methods.MethodPointcut setMethods()
MethodPointcut
that matches set methods.MethodPointcut objectMethods()
equals
,
hashCode
, and toString
.
MethodPointcut
that matches methods declared by
java.lang.Object
.MethodPointcut signature(String regexp)
ReturnType methodName(ArgumentType, ArgumentType, ...) throws ExceptionType, ExceptionTypeOmits "java.lang." from classes in java.lang package. The regular expression must be an ORO Perl5 regular expression.
regexp
- the method signature regular expression.
MethodPointcut
that matches the method signature
against a regular expression.MethodPointcut oneMethod(Method method)
method
- the method to match against.
MethodPointcut
that matches one method.MethodPointcut returnType(ClassPointcut classPointcut)
classPointcut
- the class pointcut to match against the method's
return type.
MethodPointcut
that matches
classPointcut
against the method's return typeMethodPointcut declaringClass(ClassPointcut classPointcut)
classPointcut
- the class pointcut to match against the method's
declaring class.
MethodPointcut
that matches
classPointcut
against the method's declaring
class.MethodPointcut membersOf(Class clazz)
clazz
- the class that we will check to see if the method is a
member of.
MethodPointcut
that will check to see if the
method is a member of clazz
.MethodPointcut intersection(MethodPointcut a, MethodPointcut b)
a
- the first method pointcut.b
- the second method pointcut.
MethodPointcut
that is the intersection of
a
and b
.MethodPointcut union(MethodPointcut a, MethodPointcut b)
a
- the first method pointcut.b
- the second method pointcut.
MethodPointcut
that is the union of
a
and b
.MethodPointcut not(MethodPointcut methodPointcut)
methodPointcut
- the pointcut to negate.
MethodPointcut
that inverts
methodPointcut
.
|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |