org.springframework.aop.support
Class ControlFlowPointcut


public class ControlFlowPointcut
implements ClassFilter, MethodMatcher, Pointcut

Pointcut and method matcher for use in simple cflow-style pointcut. Note that evaluating such pointcuts is 10-15 times slower than evaluating normal pointcuts, but they are useful in some cases.

Author:
Rod Johnson
Version: $Id: ControlFlowPointcut.java,v 1.5 2004/02/02 11:22:53 jhoeller Exp $
See Also: ControlFlow

Constructor Summary
ControlFlowPointcut(Class clazz)
           
ControlFlowPointcut(Class clazz, String methodName)
          Construct a new pointcut that matches all calls below the given method in the given class.

Method Summary
 ClassFiltergetClassFilter()
           
 intgetEvaluations()
          It's useful to know how many times we've fired, for optimization.
 MethodMatchergetMethodMatcher()
           
 booleanisRuntime()
           
 booleanmatches(Class clazz)
          Subclasses can override this for greater filtering (and performance).
 booleanmatches(Method m, Class targetClass)
          Subclasses can override this if it's possible to filter out some candidate classes.
 booleanmatches(Method m, Class targetClass, Object[] args)
           

Constructor Detail

ControlFlowPointcut

public ControlFlowPointcut(Class clazz)

ControlFlowPointcut

public ControlFlowPointcut(Class clazz, String methodName)
Construct a new pointcut that matches all calls below the given method in the given class. If the method name is null, matches all control flows below that class.
Parameters:
clazz
methodName
Method Detail

getClassFilter

public ClassFilter getClassFilter()

getEvaluations

public int getEvaluations()
It's useful to know how many times we've fired, for optimization.

getMethodMatcher

public MethodMatcher getMethodMatcher()

isRuntime

public boolean isRuntime()

matches

public boolean matches(Class clazz)
Subclasses can override this for greater filtering (and performance).

matches

public boolean matches(Method m, Class targetClass)
Subclasses can override this if it's possible to filter out some candidate classes.

matches

public boolean matches(Method m, Class targetClass, Object[] args)

Association Links

to Class java.lang.Class

to Class java.lang.String