org.aspectj.weaver.patterns
Class IfPointcut

java.lang.Object
  extended by org.aspectj.weaver.patterns.PatternNode
      extended by org.aspectj.weaver.patterns.Pointcut
          extended by org.aspectj.weaver.patterns.IfPointcut
All Implemented Interfaces:
IHasPosition, IHasSourceLocation
Direct Known Subclasses:
IfPointcut.IfFalsePointcut, IfPointcut.IfTruePointcut

public class IfPointcut
extends Pointcut


Nested Class Summary
static class IfPointcut.IfFalsePointcut
           
static class IfPointcut.IfTruePointcut
           
 
Nested classes/interfaces inherited from class org.aspectj.weaver.patterns.Pointcut
Pointcut.State
 
Field Summary
 int extraParameterFlags
           
 Pointcut residueSource
           
 ResolvedMember testMethod
           
 
Fields inherited from class org.aspectj.weaver.patterns.Pointcut
AND, ANNOTATION, ARGS, ATARGS, ATTHIS_OR_TARGET, ATWITHIN, ATWITHINCODE, CFLOW, CONCRETE, EMPTY_STRING_ARRAY, HANDLER, IF, IF_FALSE, IF_TRUE, KINDED, m_ignoreUnboundBindingForNames, NONE, NOT, OR, REFERENCE, RESOLVED, state, SYMBOLIC, THIS_OR_TARGET, USER_EXTENSION, WITHIN, WITHINCODE
 
Constructor Summary
IfPointcut(ResolvedMember testMethod, int extraParameterFlags)
           
IfPointcut(java.lang.String enclosingPointcutHint)
          No-arg constructor for @AJ style, where the if() body is actually the @Pointcut annotated method
 
Method Summary
 java.lang.Object accept(PatternNodeVisitor visitor, java.lang.Object data)
           
 boolean alwaysFalse()
           
 boolean alwaysTrue()
           
 Pointcut concretize1(ResolvedType inAspect, ResolvedType declaringType, IntMap bindings)
          Resolves and removes ReferencePointcuts, replacing with basic ones
 int couldMatchKinds()
          The set of ShadowKinds that this Pointcut could possibly match - an int whose bits are set according to the Kinds specified in Shadow.java
 boolean equals(java.lang.Object other)
           
 FuzzyBoolean fastMatch(FastMatchInfo type)
          Could I match any shadows in the code defined within this type?
 Pointcut getResidueSource()
           
 int hashCode()
           
static IfPointcut makeIfFalsePointcut(Pointcut.State state)
           
static IfPointcut makeIfTruePointcut(Pointcut.State state)
           
 Pointcut parameterizeWith(java.util.Map typeVariableMap, World w)
           
static Pointcut read(VersionedDataInputStream s, ISourceContext context)
           
 void resolveBindings(IScope scope, Bindings bindings)
           
 void setAlways(boolean matches)
          Called when it is determined that the pointcut refers to a constant value of TRUE or FALSE - enabling exact matching and no unnecessary calls to the method representing the if body.
 java.lang.String toString()
           
 void write(CompressingDataOutputStream s)
           
 
Methods inherited from class org.aspectj.weaver.patterns.Pointcut
assertState, check, concretize, concretize, concretize, findResidue, fromString, getPointcutKind, getTypeVariablesInScope, isDeclare, makeMatchesNothing, match, postRead, resolve, setTypeVariablesInScope
 
Methods inherited from class org.aspectj.weaver.patterns.PatternNode
copyLocationFrom, getEnd, getFileName, getSourceContext, getSourceLocation, getStart, readLocation, setLocation, traverse, writeLocation
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

testMethod

public ResolvedMember testMethod

extraParameterFlags

public int extraParameterFlags

residueSource

public Pointcut residueSource
Constructor Detail

IfPointcut

public IfPointcut(ResolvedMember testMethod,
                  int extraParameterFlags)

IfPointcut

public IfPointcut(java.lang.String enclosingPointcutHint)
No-arg constructor for @AJ style, where the if() body is actually the @Pointcut annotated method

Method Detail

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

alwaysFalse

public boolean alwaysFalse()

alwaysTrue

public boolean alwaysTrue()

getResidueSource

public Pointcut getResidueSource()

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)

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

concretize1

public Pointcut concretize1(ResolvedType inAspect,
                            ResolvedType declaringType,
                            IntMap bindings)
Description copied from class: Pointcut
Resolves and removes ReferencePointcuts, replacing with basic ones

Parameters:
inAspect - the aspect to resolve relative to
bindings - 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

parameterizeWith

public Pointcut parameterizeWith(java.util.Map typeVariableMap,
                                 World w)
Specified by:
parameterizeWith in class Pointcut

makeIfFalsePointcut

public static IfPointcut makeIfFalsePointcut(Pointcut.State state)

accept

public java.lang.Object accept(PatternNodeVisitor visitor,
                               java.lang.Object data)
Specified by:
accept in class PatternNode

makeIfTruePointcut

public static IfPointcut makeIfTruePointcut(Pointcut.State state)

setAlways

public void setAlways(boolean matches)
Called when it is determined that the pointcut refers to a constant value of TRUE or FALSE - enabling exact matching and no unnecessary calls to the method representing the if body.