org.aspectj.weaver.patterns
Class ThisOrTargetPointcut
java.lang.Object
org.aspectj.weaver.patterns.PatternNode
org.aspectj.weaver.patterns.Pointcut
org.aspectj.weaver.patterns.NameBindingPointcut
org.aspectj.weaver.patterns.ThisOrTargetPointcut
- All Implemented Interfaces:
- IHasPosition, IHasSourceLocation
public class ThisOrTargetPointcut
- extends NameBindingPointcut
Corresponds to target or this pcd.
type is initially a WildTypePattern. If it stays that way, it's a this(Foo) type deal. however, the resolveBindings method may
convert it to a BindingTypePattern, in which case, it's a this(foo) type deal.
Fields inherited from class org.aspectj.weaver.patterns.Pointcut |
AND, ANNOTATION, ARGS, ATARGS, ATTHIS_OR_TARGET, ATWITHIN, ATWITHINCODE, CFLOW, CONCRETE, EMPTY_STRING_ARRAY, HANDLER, hasBeenParameterized, IF, IF_FALSE, IF_TRUE, KINDED, lastMatchedShadowId, m_ignoreUnboundBindingForNames, NONE, NOT, OR, pointcutKind, REFERENCE, RESOLVED, state, SYMBOLIC, THIS_OR_TARGET, USER_EXTENSION, WITHIN, WITHINCODE |
Methods inherited from class org.aspectj.weaver.patterns.Pointcut |
assertState, check, concretize, concretize, concretize, findResidue, fromString, getPointcutKind, getTypeVariablesInScope, isDeclare, makeMatchesNothing, match, resolve, setTypeVariablesInScope, shouldCopyLocationForConcretize |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
ThisOrTargetPointcut
public ThisOrTargetPointcut(boolean isThis,
TypePattern type)
isBinding
public boolean isBinding()
getType
public TypePattern getType()
isThis
public boolean isThis()
parameterizeWith
public Pointcut parameterizeWith(java.util.Map typeVariableMap,
World w)
- Specified by:
parameterizeWith
in class Pointcut
couldMatchKinds
public int couldMatchKinds()
- Description copied from class:
Pointcut
- The set of ShadowKinds that this Pointcut could possibly match - an int whose bits are set according to the Kinds specified
in Shadow.java
- Specified by:
couldMatchKinds
in class Pointcut
fastMatch
public FuzzyBoolean fastMatch(FastMatchInfo type)
- Description copied from class:
Pointcut
- Could I match any shadows in the code defined within this type?
- Specified by:
fastMatch
in class Pointcut
matchInternal
protected FuzzyBoolean matchInternal(Shadow shadow)
- Specified by:
matchInternal
in class Pointcut
write
public void write(CompressingDataOutputStream s)
throws java.io.IOException
- Specified by:
write
in class PatternNode
- Throws:
java.io.IOException
read
public static Pointcut read(VersionedDataInputStream s,
ISourceContext context)
throws java.io.IOException
- Throws:
java.io.IOException
resolveBindings
public void resolveBindings(IScope scope,
Bindings bindings)
- Specified by:
resolveBindings
in class Pointcut
postRead
public void postRead(ResolvedType enclosingType)
- Overrides:
postRead
in class Pointcut
getBindingAnnotationTypePatterns
public java.util.List getBindingAnnotationTypePatterns()
- Specified by:
getBindingAnnotationTypePatterns
in class NameBindingPointcut
getBindingTypePatterns
public java.util.List getBindingTypePatterns()
- Specified by:
getBindingTypePatterns
in class NameBindingPointcut
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
findResidueInternal
protected Test findResidueInternal(Shadow shadow,
ExposedState state)
- Residue is the remainder of the pointcut match that couldn't be performed with the purely static information at compile time
and this method returns the residue of a pointcut at a particular shadow.
- Specified by:
findResidueInternal
in class Pointcut
concretize1
public Pointcut concretize1(ResolvedType inAspect,
ResolvedType declaringType,
IntMap bindings)
- Description copied from class:
Pointcut
- Resolves and removes ReferencePointcuts, replacing with basic ones
- Specified by:
concretize1
in class Pointcut
- Parameters:
inAspect
- the aspect to resolve relative tobindings
- a Map from formal index in the current lexical context -> formal index in the concrete advice that will run
This must always return a new Pointcut object (even if the concretized Pointcut is identical to the resolved one).
That behavior is assumed in many places. XXX fix implementors to handle state
accept
public java.lang.Object accept(PatternNodeVisitor visitor,
java.lang.Object data)
- Specified by:
accept
in class PatternNode