Package org.aspectj.weaver.patterns
Class DeclareAnnotation
- java.lang.Object
-
- org.aspectj.weaver.patterns.PatternNode
-
- org.aspectj.weaver.patterns.Declare
-
- org.aspectj.weaver.patterns.DeclareAnnotation
-
- All Implemented Interfaces:
IHasPosition,IHasSourceLocation
public class DeclareAnnotation extends Declare
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDeclareAnnotation.Kind
-
Field Summary
Fields Modifier and Type Field Description static DeclareAnnotation.KindAT_CONSTRUCTORstatic DeclareAnnotation.KindAT_FIELDstatic DeclareAnnotation.KindAT_METHODstatic DeclareAnnotation.KindAT_REMOVE_FROM_FIELDstatic DeclareAnnotation.KindAT_TYPE-
Fields inherited from class org.aspectj.weaver.patterns.Declare
ANNOTATION, DOMINATES, ERROR_OR_WARNING, PARENTS, PARENTSMIXIN, SOFT, TYPE_ERROR_OR_WARNING
-
Fields inherited from class org.aspectj.weaver.patterns.PatternNode
end, sourceContext, start
-
-
Constructor Summary
Constructors Constructor Description DeclareAnnotation(DeclareAnnotation.Kind kind, ISignaturePattern sigPattern)DeclareAnnotation(DeclareAnnotation.Kind kind, TypePattern typePattern)
-
Method Summary
-
Methods inherited from class org.aspectj.weaver.patterns.Declare
getDeclaringType, setDeclaringType
-
Methods inherited from class org.aspectj.weaver.patterns.PatternNode
copyLocationFrom, getEnd, getFileName, getSourceContext, getSourceLocation, getStart, readLocation, setLocation, traverse, writeLocation
-
-
-
-
Field Detail
-
AT_TYPE
public static final DeclareAnnotation.Kind AT_TYPE
-
AT_FIELD
public static final DeclareAnnotation.Kind AT_FIELD
-
AT_METHOD
public static final DeclareAnnotation.Kind AT_METHOD
-
AT_CONSTRUCTOR
public static final DeclareAnnotation.Kind AT_CONSTRUCTOR
-
AT_REMOVE_FROM_FIELD
public static final DeclareAnnotation.Kind AT_REMOVE_FROM_FIELD
-
-
Constructor Detail
-
DeclareAnnotation
public DeclareAnnotation(DeclareAnnotation.Kind kind, TypePattern typePattern)
-
DeclareAnnotation
public DeclareAnnotation(DeclareAnnotation.Kind kind, ISignaturePattern sigPattern)
-
-
Method Detail
-
getAnnotationString
public String getAnnotationString()
-
isExactPattern
public boolean isExactPattern()
-
getAnnotationMethod
public String getAnnotationMethod()
-
accept
public Object accept(PatternNodeVisitor visitor, Object data)
- Specified by:
acceptin classPatternNode
-
parameterizeWith
public Declare parameterizeWith(Map<String,UnresolvedType> typeVariableBindingMap, World w)
- Specified by:
parameterizeWithin classDeclare
-
isAdviceLike
public boolean isAdviceLike()
- Specified by:
isAdviceLikein classDeclare
-
setAnnotationString
public void setAnnotationString(String annotationString)
-
setAnnotationLocation
public void setAnnotationLocation(int start, int end)
-
getAnnotationSourceStart
public int getAnnotationSourceStart()
-
getAnnotationSourceEnd
public int getAnnotationSourceEnd()
-
setAnnotationMethod
public void setAnnotationMethod(String methodName)
-
write
public void write(CompressingDataOutputStream s) throws IOException
- Specified by:
writein classPatternNode- Throws:
IOException
-
read
public static Declare read(VersionedDataInputStream s, ISourceContext context) throws IOException
- Throws:
IOException
-
matches
public boolean matches(ResolvedMember resolvedmember, World world)
-
matches
public boolean matches(ResolvedType type)
-
setAspect
public void setAspect(ResolvedType typeX)
-
getAspect
public UnresolvedType getAspect()
-
copyAnnotationTo
public void copyAnnotationTo(ResolvedType onType)
-
getAnnotation
public AnnotationAJ getAnnotation()
-
getTypePattern
public TypePattern getTypePattern()
-
getSignaturePattern
public ISignaturePattern getSignaturePattern()
-
isStarredAnnotationPattern
public boolean isStarredAnnotationPattern()
-
getKind
public DeclareAnnotation.Kind getKind()
-
isDeclareAtConstuctor
public boolean isDeclareAtConstuctor()
-
isDeclareAtMethod
public boolean isDeclareAtMethod()
-
isDeclareAtType
public boolean isDeclareAtType()
-
isDeclareAtField
public boolean isDeclareAtField()
-
getAnnotationType
public ResolvedType getAnnotationType()
-
isAnnotationAllowedOnField
public boolean isAnnotationAllowedOnField()
-
getPatternAsString
public String getPatternAsString()
-
couldEverMatch
public boolean couldEverMatch(ResolvedType type)
-
getNameSuffix
public String getNameSuffix()
- Specified by:
getNameSuffixin classDeclare
-
setRemover
public void setRemover(boolean b)
-
isRemover
public boolean isRemover()
-
-