Top Description Inners Fields Constructors Methods
org.springframework.aop.aspectj

public Class AspectJExpressionPointcut

extends AbstractExpressionPointcut
implements ClassFilter, IntroductionAwareMethodMatcher, BeanFactoryAware
Class Inheritance
All Implemented Interfaces
org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.Aware, org.springframework.aop.IntroductionAwareMethodMatcher, org.springframework.aop.MethodMatcher, org.springframework.aop.ClassFilter
Annotations
@SuppressWarnings:serial
Imports
java.io.IOException, .ObjectInputStream, java.lang.reflect.Method, .Proxy, java.util.Arrays, .Map, .Set, java.util.concurrent.ConcurrentHashMap, org.aopalliance.intercept.MethodInvocation, org.apache.commons.logging.Log, .LogFactory, org.aspectj.weaver.patterns.NamePattern, org.aspectj.weaver.reflect.ReflectionWorld.ReflectionWorldException, .ShadowMatchImpl, org.aspectj.weaver.tools.ContextBasedMatcher, .FuzzyBoolean, .JoinPointMatch, .MatchingContext, .PointcutDesignatorHandler, .PointcutExpression, .PointcutParameter, .PointcutParser, .PointcutPrimitive, .ShadowMatch, org.springframework.aop.ClassFilter, .IntroductionAwareMethodMatcher, .MethodMatcher, .ProxyMethodInvocation, org.springframework.aop.framework.autoproxy.ProxyCreationContext, org.springframework.aop.interceptor.ExposeInvocationInterceptor, org.springframework.aop.support.AbstractExpressionPointcut, .AopUtils, org.springframework.beans.factory.BeanFactory, .BeanFactoryAware, .BeanFactoryUtils, .FactoryBean, org.springframework.beans.factory.annotation.BeanFactoryAnnotationUtils, org.springframework.beans.factory.config.ConfigurableBeanFactory, org.springframework.lang.Nullable, org.springframework.util.Assert, .ClassUtils, .ObjectUtils, .StringUtils

Spring org.springframework.aop.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.

Authors
Rob Harrop, Adrian Colyer, Rod Johnson, Juergen Hoeller, Ramnivas Laddad, Dave Syer, Yanming Zhou
Since
2.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
AspectJExpressionPointcut.BeanContextMatcher

Matcher class for the BeanNamePointcutDesignatorHandler.

private class
AspectJExpressionPointcut.BeanPointcutDesignatorHandler

Handler for the Spring-specific bean() pointcut designator extension to AspectJ.

private static class

Field Summary

Modifier and TypeField and Description
private BeanFactory
private static final Log
private transient ClassLoader
private Class<?>
private transient PointcutExpression
private String[]
private Class<?>[]
private transient Map<Method, ShadowMatch>
private static final Set<PointcutPrimitive>

Constructor Summary

AccessConstructor and Description
public
AspectJExpressionPointcut()

Create a new default AspectJExpressionPointcut.

public
AspectJExpressionPointcut(Class<?>
the declaration scope for the pointcut
declarationScope
,
String[]
the parameter names for the pointcut
paramNames
,
Class<?>[]
the parameter types for the pointcut
paramTypes
)

Create a new AspectJExpressionPointcut with the given settings.

Method Summary

Modifier and TypeMethod and Description
private void
private PointcutExpression
buildPointcutExpression(ClassLoader classLoader)

Build the underlying AspectJ pointcut expression.

private boolean
private ClassLoader
determinePointcutClassLoader()

Determine the ClassLoader to use for pointcut evaluation.

public boolean
equals(Object
the reference object with which to compare.
other
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
public ClassFilter
getClassFilter()

Implements org.springframework.aop.Pointcut.getClassFilter.

Return the ClassFilter for this pointcut.
protected String
private PointcutExpression
getFallbackPointcutExpression(Class<?> targetClass)

Get a new pointcut expression based on a target class's loader rather than the default.

public MethodMatcher
getMethodMatcher()

Implements org.springframework.aop.Pointcut.getMethodMatcher.

Return the MethodMatcher for this pointcut.
public PointcutExpression
getPointcutExpression()

Return the underlying AspectJ pointcut expression.

private RuntimeTestWalker
private ShadowMatch
getShadowMatch(Method targetMethod, Method originalMethod)

private ShadowMatch
getTargetShadowMatch(Method method, Class<?> targetClass)

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for the object.
private PointcutParser
initializePointcutParser(ClassLoader classLoader)

Initialize the underlying AspectJ pointcut parser.

public boolean
isRuntime()

Implements org.springframework.aop.MethodMatcher.isRuntime.

Is this MethodMatcher dynamic, that is, must a final check be made via the matches(Method, Class, Object[]) method at runtime even if matches(Method, Class) returns true?
public boolean
matches(Class<?>
the candidate target class
targetClass
)

Implements org.springframework.aop.ClassFilter.matches.

Should the pointcut apply to the given interface or target class?
public boolean
matches(Method
the candidate method
method
,
Class<?>
the target class
targetClass
,
boolean
true if the object on whose behalf we are asking is the subject on one or more introductions; false otherwise
hasIntroductions
)

Implements org.springframework.aop.IntroductionAwareMethodMatcher.matches.

Perform static checking whether the given method matches.
public boolean
matches(Method
the candidate method
method
,
Class<?>
the target class
targetClass
)

Implements org.springframework.aop.MethodMatcher.matches.

Perform static checking to determine whether the given method matches.
public boolean
matches(Method
the candidate method
method
,
Class<?>
the target class
targetClass
,
Object...
arguments to the method
args
)

Implements org.springframework.aop.MethodMatcher.matches.

Check whether there is a runtime (dynamic) match for this method, which must have matched statically.
private PointcutExpression
obtainPointcutExpression()

Check whether this pointcut is ready to match, lazily building the underlying AspectJ pointcut expression.

private void
private String
replaceBooleanOperators(String pcExpr)

If a pointcut expression has been specified in XML, the user cannot write "and" as "&&" (though && will work).

private String
public void
setBeanFactory(BeanFactory
owning BeanFactory (never null). The bean can immediately call methods on the factory.
beanFactory
)

Implements org.springframework.beans.factory.BeanFactoryAware.setBeanFactory.

Callback that supplies the owning factory to a bean instance.
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()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from org.springframework.aop.support.AbstractExpressionPointcut:
getExpressiongetLocationonSetExpressionsetExpressionsetLocation

Field Detail

beanFactoryback to summary
private BeanFactory beanFactory
Annotations
@Nullable
loggerback to summary
private static final Log logger
pointcutClassLoaderback to summary
private transient ClassLoader pointcutClassLoader
Annotations
@Nullable
pointcutDeclarationScopeback to summary
private Class<?> pointcutDeclarationScope
Annotations
@Nullable
pointcutExpressionback to summary
private transient PointcutExpression pointcutExpression
Annotations
@Nullable
pointcutParameterNamesback to summary
private String[] pointcutParameterNames
pointcutParameterTypesback to summary
private Class<?>[] pointcutParameterTypes
shadowMatchCacheback to summary
private transient Map<Method, ShadowMatch> shadowMatchCache
SUPPORTED_PRIMITIVESback to summary
private static final Set<PointcutPrimitive> SUPPORTED_PRIMITIVES

Constructor Detail

AspectJExpressionPointcutback to summary
public AspectJExpressionPointcut()

Create a new default AspectJExpressionPointcut.

AspectJExpressionPointcutback to summary
public AspectJExpressionPointcut(Class<?> declarationScope, String[] paramNames, Class<?>[] paramTypes)

Create a new AspectJExpressionPointcut with the given settings.

Parameters
declarationScope:Class<?>

the declaration scope for the pointcut

paramNames:String[]

the parameter names for the pointcut

paramTypes:Class<?>[]

the parameter types for the pointcut

Method Detail

bindParametersback to summary
private void bindParameters(ProxyMethodInvocation invocation, JoinPointMatch jpm)
buildPointcutExpressionback to summary
private PointcutExpression buildPointcutExpression(ClassLoader classLoader)

Build the underlying AspectJ pointcut expression.

containsAnnotationPointcutback to summary
private boolean containsAnnotationPointcut()
determinePointcutClassLoaderback to summary
private ClassLoader determinePointcutClassLoader()

Determine the ClassLoader to use for pointcut evaluation.

Annotations
@Nullable
equalsback to summary
public boolean equals(Object other)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
other:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getClassFilterback to summary
public ClassFilter getClassFilter()

Implements org.springframework.aop.Pointcut.getClassFilter.

Doc from org.springframework.aop.Pointcut.getClassFilter.

Return the ClassFilter for this pointcut.

Returns:ClassFilter

the ClassFilter (never null)

Annotations
@Override
getCurrentProxiedBeanNameback to summary
protected String getCurrentProxiedBeanName()
Annotations
@Nullable
getFallbackPointcutExpressionback to summary
private PointcutExpression getFallbackPointcutExpression(Class<?> targetClass)

Get a new pointcut expression based on a target class's loader rather than the default.

Annotations
@Nullable
getMethodMatcherback to summary
public MethodMatcher getMethodMatcher()

Implements org.springframework.aop.Pointcut.getMethodMatcher.

Doc from org.springframework.aop.Pointcut.getMethodMatcher.

Return the MethodMatcher for this pointcut.

Returns:MethodMatcher

the MethodMatcher (never null)

Annotations
@Override
getPointcutExpressionback to summary
public PointcutExpression getPointcutExpression()

Return the underlying AspectJ pointcut expression.

getRuntimeTestWalkerback to summary
private RuntimeTestWalker getRuntimeTestWalker(ShadowMatch shadowMatch)
getShadowMatchback to summary
private ShadowMatch getShadowMatch(Method targetMethod, Method originalMethod)
getTargetShadowMatchback to summary
private ShadowMatch getTargetShadowMatch(Method method, Class<?> targetClass)
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object.

Annotations
@Override
initializePointcutParserback to summary
private PointcutParser initializePointcutParser(ClassLoader classLoader)

Initialize the underlying AspectJ pointcut parser.

isRuntimeback to summary
public boolean isRuntime()

Implements org.springframework.aop.MethodMatcher.isRuntime.

Doc from org.springframework.aop.MethodMatcher.isRuntime.

Is this MethodMatcher dynamic, that is, must a final check be made via the matches(Method, Class, Object[]) method at runtime even if matches(Method, Class) returns true?

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

Returns:boolean

whether a runtime match via matches(Method, Class, Object[]) is required if static matching passed

Annotations
@Override
matchesback to summary
public boolean matches(Class<?> targetClass)

Implements org.springframework.aop.ClassFilter.matches.

Doc from org.springframework.aop.ClassFilter.matches.

Should the pointcut apply to the given interface or target class?

Parameters
targetClass:Class<?>

the candidate target class

Returns:boolean

whether the advice should apply to the given target class

Annotations
@Override
matchesback to summary
public boolean matches(Method method, Class<?> targetClass, boolean hasIntroductions)

Implements org.springframework.aop.IntroductionAwareMethodMatcher.matches.

Doc from org.springframework.aop.IntroductionAwareMethodMatcher.matches.

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:Method

the candidate method

targetClass:Class<?>

the target class

hasIntroductions:boolean

true if the object on whose behalf we are asking is the subject on one or more introductions; false otherwise

Returns:boolean

whether this method matches statically

Annotations
@Override
matchesback to summary
public boolean matches(Method method, Class<?> targetClass)

Implements org.springframework.aop.MethodMatcher.matches.

Doc from org.springframework.aop.MethodMatcher.matches.

Perform static checking to determine whether the given method matches.

If this method returns false or if isRuntime() returns false, no runtime check (i.e. no matches(Method, Class, Object[]) call) will be made.

Parameters
method:Method

the candidate method

targetClass:Class<?>

the target class

Returns:boolean

whether this method matches statically

Annotations
@Override
matchesback to summary
public boolean matches(Method method, Class<?> targetClass, Object... args)

Implements org.springframework.aop.MethodMatcher.matches.

Doc from org.springframework.aop.MethodMatcher.matches.

Check whether there is a runtime (dynamic) match for this method, which must have matched statically.

This method is invoked only if matches(Method, Class) returns true for the given method and target class, and if isRuntime() returns true.

Invoked immediately before potential running of the advice, after any advice earlier in the advice chain has run.

Parameters
method:Method

the candidate method

targetClass:Class<?>

the target class

args:Object[]

arguments to the method

Returns:boolean

whether there's a runtime match

Annotations
@Override
obtainPointcutExpressionback to summary
private PointcutExpression obtainPointcutExpression()

Check whether this pointcut is ready to match, lazily building the underlying AspectJ pointcut expression.

readObjectback to summary
private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException
replaceBooleanOperatorsback to summary
private String replaceBooleanOperators(String pcExpr)

If a pointcut expression has been specified in XML, the user cannot write "and" as "&&" (though && will work).

We also allow "and" between two pointcut sub-expressions.

This method converts back to && for the AspectJ pointcut parser.

resolveExpressionback to summary
private String resolveExpression()
setBeanFactoryback to summary
public void setBeanFactory(BeanFactory beanFactory)

Implements org.springframework.beans.factory.BeanFactoryAware.setBeanFactory.

Doc from org.springframework.beans.factory.BeanFactoryAware.setBeanFactory.

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 InitializingBean#afterPropertiesSet() or a custom init-method.

Parameters
beanFactory:BeanFactory

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

Annotations
@Override
setParameterNamesback to summary
public void setParameterNames(String... names)

Set the parameter names for the pointcut.

setParameterTypesback to summary
public void setParameterTypes(Class<?>... types)

Set the parameter types for the pointcut.

setPointcutDeclarationScopeback to summary
public void setPointcutDeclarationScope(Class<?> pointcutDeclarationScope)

Set the declaration scope for the pointcut.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
org.springframework.aop.aspectj back to summary

private Class AspectJExpressionPointcut.BeanContextMatcher

extends Object
implements ContextBasedMatcher
Class Inheritance
  • java.lang.Object
  • org.springframework.aop.aspectj.AspectJExpressionPointcut.BeanContextMatcher
All Implemented Interfaces
org.aspectj.weaver.tools.ContextBasedMatcher

Matcher class for the BeanNamePointcutDesignatorHandler.

Dynamic match tests for this matcher always return true, since the matching decision is made at the proxy creation time. For static match tests, this matcher abstains to allow the overall pointcut to match even when negation is used with the bean() pointcut.

Field Summary

Modifier and TypeField and Description
private final NamePattern

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private FuzzyBoolean
contextMatch(Class<?> targetType)

public boolean
couldMatchJoinPointsInType(Class<T> someClass)

Implements org.aspectj.weaver.tools.ContextBasedMatcher.couldMatchJoinPointsInType.

Deprecated
return true iff this matcher could ever match a join point in the given type
public boolean
couldMatchJoinPointsInType(Class<T> someClass, MatchingContext context)

Implements org.aspectj.weaver.tools.ContextBasedMatcher.couldMatchJoinPointsInType.

Deprecated
return true iff this matcher could ever match a join point in the given type, may also use any match context information available
private boolean
matchesBean(String advisedBeanName)

public boolean
matchesDynamically(MatchingContext context)

Implements org.aspectj.weaver.tools.ContextBasedMatcher.matchesDynamically.

Called during processing of ShadowMatch.matchesJoinPoint when matchesStatically returned FuzzyBoolean.MAYBE.
public FuzzyBoolean
matchesStatically(MatchingContext context)

Implements org.aspectj.weaver.tools.ContextBasedMatcher.matchesStatically.

Return FuzzyBoolean.YES if a join point with the given matching context is always matched.
public boolean
mayNeedDynamicTest()

Implements org.aspectj.weaver.tools.ContextBasedMatcher.mayNeedDynamicTest.

return true if matchesStatically can ever return FuzzyBoolean.MAYBE (necessitating a per-join point test to determine matching at a given join point).
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

expressionPatternback to summary
private final NamePattern expressionPattern

Constructor Detail

BeanContextMatcherback to summary
public BeanContextMatcher(String expression)

Method Detail

contextMatchback to summary
private FuzzyBoolean contextMatch(Class<?> targetType)
couldMatchJoinPointsInTypeback to summary
public boolean couldMatchJoinPointsInType(Class<T> someClass)

Implements org.aspectj.weaver.tools.ContextBasedMatcher.couldMatchJoinPointsInType.

Doc from org.aspectj.weaver.tools.ContextBasedMatcher.couldMatchJoinPointsInType.

Deprecated

return true iff this matcher could ever match a join point in the given type

Annotations
@Override
@SuppressWarnings:rawtypes
@Deprecated
couldMatchJoinPointsInTypeback to summary
public boolean couldMatchJoinPointsInType(Class<T> someClass, MatchingContext context)

Implements org.aspectj.weaver.tools.ContextBasedMatcher.couldMatchJoinPointsInType.

Doc from org.aspectj.weaver.tools.ContextBasedMatcher.couldMatchJoinPointsInType.

Deprecated

return true iff this matcher could ever match a join point in the given type, may also use any match context information available

Annotations
@Override
@SuppressWarnings:rawtypes
@Deprecated
matchesBeanback to summary
private boolean matchesBean(String advisedBeanName)
matchesDynamicallyback to summary
public boolean matchesDynamically(MatchingContext context)

Implements org.aspectj.weaver.tools.ContextBasedMatcher.matchesDynamically.

Doc from org.aspectj.weaver.tools.ContextBasedMatcher.matchesDynamically.

Called during processing of ShadowMatch.matchesJoinPoint when matchesStatically returned FuzzyBoolean.MAYBE.

Annotations
@Override
matchesStaticallyback to summary
public FuzzyBoolean matchesStatically(MatchingContext context)

Implements org.aspectj.weaver.tools.ContextBasedMatcher.matchesStatically.

Doc from org.aspectj.weaver.tools.ContextBasedMatcher.matchesStatically.

Return FuzzyBoolean.YES if a join point with the given matching context is always matched. Return FuzzyBoolean.NO if a join point with the given matching context is never matched. Return FuzzyBoolean.MAYBE if a match cannot be determined statically (whilst generating a ShadowMatch), and must be determined on a per-join point basis.

Annotations
@Override
mayNeedDynamicTestback to summary
public boolean mayNeedDynamicTest()

Implements org.aspectj.weaver.tools.ContextBasedMatcher.mayNeedDynamicTest.

Doc from org.aspectj.weaver.tools.ContextBasedMatcher.mayNeedDynamicTest.

return true if matchesStatically can ever return FuzzyBoolean.MAYBE (necessitating a per-join point test to determine matching at a given join point).

Annotations
@Override
org.springframework.aop.aspectj back to summary

private Class AspectJExpressionPointcut.BeanPointcutDesignatorHandler

extends Object
implements PointcutDesignatorHandler
Class Inheritance
  • java.lang.Object
  • org.springframework.aop.aspectj.AspectJExpressionPointcut.BeanPointcutDesignatorHandler
All Implemented Interfaces
org.aspectj.weaver.tools.PointcutDesignatorHandler

Handler for the Spring-specific bean() pointcut designator extension to AspectJ.

This handler must be added to each pointcut object that needs to handle the bean() PCD. Matching context is obtained automatically by examining a thread local variable and therefore a matching context need not be set on the pointcut.

Field Summary

Modifier and TypeField and Description
private static final String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public String
public ContextBasedMatcher
parse(String
the body of the pointcut expression. For example, given the expression "bean(*DAO)" the parse method will be called with the argument "*DAO".
expression
)

Implements org.aspectj.weaver.tools.PointcutDesignatorHandler.parse.

Parse the given expression string and return a ContextBasedMatcher that can be used for matching.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

BEAN_DESIGNATOR_NAMEback to summary
private static final String BEAN_DESIGNATOR_NAME

Constructor Detail

BeanPointcutDesignatorHandlerback to summary
private BeanPointcutDesignatorHandler()

Method Detail

getDesignatorNameback to summary
public String getDesignatorName()

Implements org.aspectj.weaver.tools.PointcutDesignatorHandler.getDesignatorName.

Doc from org.aspectj.weaver.tools.PointcutDesignatorHandler.getDesignatorName.

The name of this pointcut designator. For example, if this designator handles a "bean(<NamePattern>) format designator, this method would return "bean".

Annotations
@Override
parseback to summary
public ContextBasedMatcher parse(String expression)

Implements org.aspectj.weaver.tools.PointcutDesignatorHandler.parse.

Doc from org.aspectj.weaver.tools.PointcutDesignatorHandler.parse.

Parse the given expression string and return a ContextBasedMatcher that can be used for matching.

Parameters
expression:String

the body of the pointcut expression. For example, given the expression "bean(*DAO)" the parse method will be called with the argument "*DAO".

Returns:ContextBasedMatcher

a pointcut expression that can be used for matching.

Annotations
@Override
org.springframework.aop.aspectj back to summary

private Class AspectJExpressionPointcut.DefensiveShadowMatch

extends Object
implements ShadowMatch
Class Inheritance
  • java.lang.Object
  • org.springframework.aop.aspectj.AspectJExpressionPointcut.DefensiveShadowMatch
All Implemented Interfaces
org.aspectj.weaver.tools.ShadowMatch

Field Summary

Modifier and TypeField and Description
private final ShadowMatch
private final ShadowMatch

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
alwaysMatches()

Implements org.aspectj.weaver.tools.ShadowMatch.alwaysMatches.

True iff the pointcut expression will match any join point at this shadow (for example, any call to the given method).
public JoinPointMatch
matchesJoinPoint(Object
the object bound to this at the join point
thisObject
,
Object
the object bound to target at the join point
targetObject
,
Object[]
the arguments at the join point
args
)

Implements org.aspectj.weaver.tools.ShadowMatch.matchesJoinPoint.

Return the result of matching a join point at this shadow with the given this, target, and args.
public boolean
maybeMatches()

Implements org.aspectj.weaver.tools.ShadowMatch.maybeMatches.

True if the pointcut expression may match some join points at this shadow (for example, some calls to the given method may match, depending on the type of the caller).
public boolean
neverMatches()

Implements org.aspectj.weaver.tools.ShadowMatch.neverMatches.

True iff the pointcut expression can never match any join point at this shadow (for example, the pointcut will never match a call to the given method).
public void
setMatchingContext(MatchingContext aMatchContext)

Implements org.aspectj.weaver.tools.ShadowMatch.setMatchingContext.

Set a matching context to be used when matching join points.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

otherback to summary
private final ShadowMatch other
primaryback to summary
private final ShadowMatch primary

Constructor Detail

DefensiveShadowMatchback to summary
public DefensiveShadowMatch(ShadowMatch primary, ShadowMatch other)

Method Detail

alwaysMatchesback to summary
public boolean alwaysMatches()

Implements org.aspectj.weaver.tools.ShadowMatch.alwaysMatches.

Doc from org.aspectj.weaver.tools.ShadowMatch.alwaysMatches.

True iff the pointcut expression will match any join point at this shadow (for example, any call to the given method).

Annotations
@Override
matchesJoinPointback to summary
public JoinPointMatch matchesJoinPoint(Object thisObject, Object targetObject, Object[] args)

Implements org.aspectj.weaver.tools.ShadowMatch.matchesJoinPoint.

Doc from org.aspectj.weaver.tools.ShadowMatch.matchesJoinPoint.

Return the result of matching a join point at this shadow with the given this, target, and args.

Parameters
thisObject:Object

the object bound to this at the join point

targetObject:Object

the object bound to target at the join point

args:Object[]

the arguments at the join point

Annotations
@Override
maybeMatchesback to summary
public boolean maybeMatches()

Implements org.aspectj.weaver.tools.ShadowMatch.maybeMatches.

Doc from org.aspectj.weaver.tools.ShadowMatch.maybeMatches.

True if the pointcut expression may match some join points at this shadow (for example, some calls to the given method may match, depending on the type of the caller).

If alwaysMatches is true, then maybeMatches is always true.

Annotations
@Override
neverMatchesback to summary
public boolean neverMatches()

Implements org.aspectj.weaver.tools.ShadowMatch.neverMatches.

Doc from org.aspectj.weaver.tools.ShadowMatch.neverMatches.

True iff the pointcut expression can never match any join point at this shadow (for example, the pointcut will never match a call to the given method).

Annotations
@Override
setMatchingContextback to summary
public void setMatchingContext(MatchingContext aMatchContext)

Implements org.aspectj.weaver.tools.ShadowMatch.setMatchingContext.

Doc from org.aspectj.weaver.tools.ShadowMatch.setMatchingContext.

Set a matching context to be used when matching join points.

Annotations
@Override