org.aspectj.weaver.patterns
Class ExactAnnotationFieldTypePattern

java.lang.Object
  extended by org.aspectj.weaver.patterns.PatternNode
      extended by org.aspectj.weaver.patterns.AnnotationTypePattern
          extended by org.aspectj.weaver.patterns.ExactAnnotationTypePattern
              extended by org.aspectj.weaver.patterns.ExactAnnotationFieldTypePattern
All Implemented Interfaces:
IHasPosition, IHasSourceLocation

public class ExactAnnotationFieldTypePattern
extends ExactAnnotationTypePattern

Represents an attempt to bind the field of an annotation within a pointcut. For example:

 before(Level lev): execution(* *(..)) && @annotation(TraceAnnotation(lev))
 

This binding annotation type pattern will be for 'lev'.


Field Summary
 
Fields inherited from class org.aspectj.weaver.patterns.AnnotationTypePattern
AND, ANY, ANY_KEY, BINDING, BINDINGFIELD, ELLIPSIS, ELLIPSIS_KEY, EXACT, EXACTFIELD, NONE, NOT, OR, WILD
 
Constructor Summary
ExactAnnotationFieldTypePattern(ExactAnnotationTypePattern p, java.lang.String formalName)
           
ExactAnnotationFieldTypePattern(UnresolvedType annotationType, java.lang.String formalName)
           
 
Method Summary
 java.lang.Object accept(PatternNodeVisitor visitor, java.lang.Object data)
           
 boolean equals(java.lang.Object obj)
           
 FuzzyBoolean fastMatches(AnnotatedElement annotated)
           
 UnresolvedType getAnnotationType()
           
 java.util.Map getAnnotationValues()
           
 ResolvedType getResolvedAnnotationType()
           
 int hashCode()
           
 FuzzyBoolean matches(AnnotatedElement annotated)
           
 FuzzyBoolean matches(AnnotatedElement annotated, ResolvedType[] parameterAnnotations)
           
 FuzzyBoolean matchesRuntimeType(AnnotatedElement annotated)
           
 AnnotationTypePattern parameterizeWith(java.util.Map typeVariableMap, World w)
           
static AnnotationTypePattern read(VersionedDataInputStream s, ISourceContext context)
           
 void resolve(World world)
           
 AnnotationTypePattern resolveBindings(IScope scope, Bindings bindings, boolean allowBinding)
          resolve one of these funky things.
 java.lang.String toString()
           
 void write(CompressingDataOutputStream s)
           
 
Methods inherited from class org.aspectj.weaver.patterns.AnnotationTypePattern
isAny, isForParameterAnnotationMatch, remapAdviceFormals, setForParameterAnnotationMatch
 
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
 

Constructor Detail

ExactAnnotationFieldTypePattern

public ExactAnnotationFieldTypePattern(ExactAnnotationTypePattern p,
                                       java.lang.String formalName)

ExactAnnotationFieldTypePattern

public ExactAnnotationFieldTypePattern(UnresolvedType annotationType,
                                       java.lang.String formalName)
Method Detail

resolveBindings

public AnnotationTypePattern resolveBindings(IScope scope,
                                             Bindings bindings,
                                             boolean allowBinding)
resolve one of these funky things. Need to:
(a) Check the formal is bound
(b) Check the annotation type is valid

Overrides:
resolveBindings in class ExactAnnotationTypePattern

write

public void write(CompressingDataOutputStream s)
           throws java.io.IOException
Overrides:
write in class ExactAnnotationTypePattern
Throws:
java.io.IOException

read

public static AnnotationTypePattern read(VersionedDataInputStream s,
                                         ISourceContext context)
                                  throws java.io.IOException
Throws:
java.io.IOException

accept

public java.lang.Object accept(PatternNodeVisitor visitor,
                               java.lang.Object data)
Overrides:
accept in class ExactAnnotationTypePattern

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class ExactAnnotationTypePattern

hashCode

public int hashCode()
Overrides:
hashCode in class ExactAnnotationTypePattern

fastMatches

public FuzzyBoolean fastMatches(AnnotatedElement annotated)
Overrides:
fastMatches in class ExactAnnotationTypePattern

getAnnotationType

public UnresolvedType getAnnotationType()
Overrides:
getAnnotationType in class ExactAnnotationTypePattern

getAnnotationValues

public java.util.Map getAnnotationValues()
Overrides:
getAnnotationValues in class ExactAnnotationTypePattern

getResolvedAnnotationType

public ResolvedType getResolvedAnnotationType()
Overrides:
getResolvedAnnotationType in class ExactAnnotationTypePattern

matches

public FuzzyBoolean matches(AnnotatedElement annotated,
                            ResolvedType[] parameterAnnotations)
Overrides:
matches in class ExactAnnotationTypePattern

matches

public FuzzyBoolean matches(AnnotatedElement annotated)
Overrides:
matches in class ExactAnnotationTypePattern

matchesRuntimeType

public FuzzyBoolean matchesRuntimeType(AnnotatedElement annotated)
Overrides:
matchesRuntimeType in class ExactAnnotationTypePattern

parameterizeWith

public AnnotationTypePattern parameterizeWith(java.util.Map typeVariableMap,
                                              World w)
Overrides:
parameterizeWith in class ExactAnnotationTypePattern

resolve

public void resolve(World world)
Overrides:
resolve in class ExactAnnotationTypePattern

toString

public java.lang.String toString()
Overrides:
toString in class ExactAnnotationTypePattern