public class

AspectJExpressionPointcut

extends AbstractExpressionPointcut
implements ClassFilter IntroductionAwareMethodMatcher BeanFactoryAware
java.lang.Object
   ↳ org.springframework.aop.support.AbstractExpressionPointcut
     ↳ org.springframework.aop.aspectj.AspectJExpressionPointcut

Class Overview

Spring Pointcut implementation that uses the AspectJ weaver to evaluate a pointcut expression.

The pointcut expression value is an AspectJ expression. This can reference other pointcuts and use composition and other operations.

Naturally, as this is to be processed by Spring AOP's proxy-based model, only method execution pointcuts are supported.

Summary

[Expand]
Inherited Fields
From interface org.springframework.aop.ClassFilter
From interface org.springframework.aop.MethodMatcher
From interface org.springframework.aop.Pointcut
Public Constructors
AspectJExpressionPointcut()
Create a new default AspectJExpressionPointcut.
AspectJExpressionPointcut(Class declarationScope, String[] paramNames, Class[] paramTypes)
Create a new AspectJExpressionPointcut with the given settings.
Public Methods
boolean equals(Object other)
ClassFilter getClassFilter()
MethodMatcher getMethodMatcher()
PointcutExpression getPointcutExpression()
Return the underlying AspectJ pointcut expression.
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)
boolean matches(Class targetClass)
boolean matches(Method method, Class targetClass, boolean beanHasIntroductions)
Perform static checking whether the given method matches.
void setBeanFactory(BeanFactory beanFactory)
Callback that supplies the owning factory to a bean instance.
void setParameterNames(String[] names)
Set the parameter names for the pointcut.
void setParameterTypes(Class[] types)
Set the parameter types for the pointcut.
void setPointcutDeclarationScope(Class pointcutDeclarationScope)
Set the declaration scope for the pointcut.
String toString()
Protected Methods
String getCurrentProxiedBeanName()
[Expand]
Inherited Methods
From class org.springframework.aop.support.AbstractExpressionPointcut
From class java.lang.Object
From interface org.springframework.aop.ClassFilter
From interface org.springframework.aop.IntroductionAwareMethodMatcher
From interface org.springframework.aop.MethodMatcher
From interface org.springframework.aop.Pointcut
From interface org.springframework.aop.support.ExpressionPointcut
From interface org.springframework.beans.factory.BeanFactoryAware

Public Constructors

public AspectJExpressionPointcut ()

Create a new default AspectJExpressionPointcut.

public AspectJExpressionPointcut (Class declarationScope, String[] paramNames, Class[] paramTypes)

Create a new AspectJExpressionPointcut with the given settings.

Parameters
declarationScope the declaration scope for the pointcut
paramNames the parameter names for the pointcut
paramTypes the parameter types for the pointcut

Public Methods

public boolean equals (Object other)

public ClassFilter getClassFilter ()

public MethodMatcher getMethodMatcher ()

public PointcutExpression getPointcutExpression ()

Return the underlying AspectJ pointcut expression.

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)

public boolean matches (Class targetClass)

public boolean matches (Method method, Class targetClass, boolean beanHasIntroductions)

Perform static checking whether the given method matches. This may be invoked instead of the 2-arg matches(java.lang.reflect.Method, Class) method if the caller supports the extended IntroductionAwareMethodMatcher interface.

Parameters
method the candidate method
targetClass the target class (may be null, in which case the candidate class must be taken to be the method's declaring class)
beanHasIntroductions true if the object on whose behalf we are asking is the subject on one or more introductions; false otherwise
Returns
  • whether or not this method matches statically

public void setBeanFactory (BeanFactory beanFactory)

Callback that supplies the owning factory to a bean instance.

Invoked after the population of normal bean properties but before an initialization callback such as afterPropertiesSet() or a custom init-method.

Parameters
beanFactory owning BeanFactory (never null). The bean can immediately call methods on the factory.

public void setParameterNames (String[] names)

Set the parameter names for the pointcut.

public void setParameterTypes (Class[] types)

Set the parameter types for the pointcut.

public void setPointcutDeclarationScope (Class pointcutDeclarationScope)

Set the declaration scope for the pointcut.

public String toString ()

Protected Methods

protected String getCurrentProxiedBeanName ()