public class

ControlFlowPointcut

extends Object
implements Serializable ClassFilter MethodMatcher Pointcut
java.lang.Object
   ↳ org.springframework.aop.support.ControlFlowPointcut

Class Overview

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.

See Also

Summary

[Expand]
Inherited Fields
From interface org.springframework.aop.ClassFilter
From interface org.springframework.aop.MethodMatcher
From interface org.springframework.aop.Pointcut
Public Constructors
ControlFlowPointcut(Class clazz)
Construct a new pointcut that matches all control flows below that class.
ControlFlowPointcut(Class clazz, String methodName)
Construct a new pointcut that matches all calls below the given method in the given class.
Public Methods
boolean equals(Object other)
ClassFilter getClassFilter()
Return the ClassFilter for this pointcut.
int getEvaluations()
It's useful to know how many times we've fired, for optimization.
MethodMatcher getMethodMatcher()
Return the MethodMatcher for this pointcut.
int hashCode()
boolean isRuntime()
Is this MethodMatcher dynamic, that is, must a final call be made on the matches(java.lang.reflect.Method, Class, Object[]) method at runtime even if the 2-arg matches method returns true?

Can be invoked when an AOP proxy is created, and need not be invoked again before each method invocation,

boolean matches(Method method, Class targetClass, Object[] args)
boolean matches(Method method, Class targetClass)
Subclasses can override this if it's possible to filter out some candidate classes.
boolean matches(Class clazz)
Subclasses can override this for greater filtering (and performance).
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.aop.ClassFilter
From interface org.springframework.aop.MethodMatcher
From interface org.springframework.aop.Pointcut

Public Constructors

public ControlFlowPointcut (Class clazz)

Construct a new pointcut that matches all control flows below that class.

Parameters
clazz the clazz

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 the clazz
methodName the name of the method

Public Methods

public boolean equals (Object other)

public ClassFilter getClassFilter ()

Return the ClassFilter for this pointcut.

Returns
  • the ClassFilter (never null)

public int getEvaluations ()

It's useful to know how many times we've fired, for optimization.

public MethodMatcher getMethodMatcher ()

Return the MethodMatcher for this pointcut.

Returns
  • the MethodMatcher (never null)

public int hashCode ()

public boolean isRuntime ()

Is this MethodMatcher dynamic, that is, must a final call be made on the matches(java.lang.reflect.Method, Class, Object[]) method at runtime even if the 2-arg matches method returns true?

Can be invoked when an AOP proxy is created, and need not be invoked again before each method invocation,

Returns

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

public boolean matches (Method method, Class targetClass)

Subclasses can override this if it's possible to filter out some candidate classes.

public boolean matches (Class clazz)

Subclasses can override this for greater filtering (and performance).