Package org.aspectj.weaver.patterns
Klasse DeclareAnnotation
java.lang.Object
org.aspectj.weaver.patterns.PatternNode
org.aspectj.weaver.patterns.Declare
org.aspectj.weaver.patterns.DeclareAnnotation
- Alle implementierten Schnittstellen:
IHasPosition,IHasSourceLocation
Represents a declare annotation statement, one of atField, atMethod, atConstructor or atType.
- Autor:
- Andy Clement
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic classCaptures type of declare annotation (method/type/field/constructor) -
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final DeclareAnnotation.Kindstatic final DeclareAnnotation.Kindstatic final DeclareAnnotation.Kindstatic final DeclareAnnotation.Kindstatic final DeclareAnnotation.KindVon Klasse geerbte Felder org.aspectj.weaver.patterns.Declare
ANNOTATION, DOMINATES, ERROR_OR_WARNING, PARENTS, PARENTSMIXIN, SOFT, TYPE_ERROR_OR_WARNINGVon Klasse geerbte Felder org.aspectj.weaver.patterns.PatternNode
end, sourceContext, start -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungDeclareAnnotation(DeclareAnnotation.Kind kind, ISignaturePattern sigPattern) Constructor for declare atMethod/atField/atConstructor.DeclareAnnotation(DeclareAnnotation.Kind kind, TypePattern typePattern) Constructor for declare atType. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungaccept(PatternNodeVisitor visitor, Object data) voidcopyAnnotationTo(ResolvedType onType) booleancouldEverMatch(ResolvedType type) Return true if this declare annotation could ever match something in the specified type - only really able to make intelligent decision if a type was specified in the sig/type pattern signature.booleanintintReturns the string, useful before the real annotation has been resolvedgetKind()Provide a name suffix so that we can tell the different declare annotations forms apart in the AjProblemReporterinthashCode()booleanIndicates if this declare should be treated like advice.booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanmatches(ResolvedMember resolvedmember, World world) For declare atConstructor, atMethod, atFieldbooleanmatches(ResolvedType type) For declare atType.parameterizeWith(Map<String, UnresolvedType> typeVariableBindingMap, World w) Returns a version of this declare element in which all references to type variables are replaced with their bindings given in the map.static Declareread(VersionedDataInputStream s, ISourceContext context) voidReturns this declare mutatedvoidsetAnnotationLocation(int start, int end) voidsetAnnotationMethod(String methodName) voidsetAnnotationString(String annotationString) voidsetAspect(ResolvedType typeX) voidsetRemover(boolean b) toString()traverse(PatternNodeVisitor visitor, Object data) voidVon Klasse geerbte Methoden org.aspectj.weaver.patterns.Declare
getDeclaringType, setDeclaringTypeVon Klasse geerbte Methoden org.aspectj.weaver.patterns.PatternNode
copyLocationFrom, getEnd, getFileName, getSourceContext, getSourceLocation, getStart, readLocation, setLocation, writeLocation
-
Felddetails
-
AT_TYPE
-
AT_FIELD
-
AT_METHOD
-
AT_CONSTRUCTOR
-
AT_REMOVE_FROM_FIELD
-
-
Konstruktordetails
-
DeclareAnnotation
Constructor for declare atType. -
DeclareAnnotation
Constructor for declare atMethod/atField/atConstructor.
-
-
Methodendetails
-
getAnnotationString
Returns the string, useful before the real annotation has been resolved -
isExactPattern
public boolean isExactPattern() -
getAnnotationMethod
-
toString
-
accept
- Angegeben von:
acceptin KlassePatternNode
-
traverse
- Setzt außer Kraft:
traversein KlassePatternNode
-
resolve
Beschreibung aus Klasse kopiert:DeclareReturns this declare mutated -
parameterizeWith
Beschreibung aus Klasse kopiert:DeclareReturns a version of this declare element in which all references to type variables are replaced with their bindings given in the map.- Angegeben von:
parameterizeWithin KlasseDeclare
-
isAdviceLike
public boolean isAdviceLike()Beschreibung aus Klasse kopiert:DeclareIndicates if this declare should be treated like advice. If true, the declare will have no effect in an abstract aspect. It will be inherited by any concrete aspects and will have an effect for each concrete aspect it is ultimately inherited by.- Angegeben von:
isAdviceLikein KlasseDeclare
-
setAnnotationString
-
setAnnotationLocation
public void setAnnotationLocation(int start, int end) -
getAnnotationSourceStart
public int getAnnotationSourceStart() -
getAnnotationSourceEnd
public int getAnnotationSourceEnd() -
setAnnotationMethod
-
equals
-
hashCode
public int hashCode() -
write
- Angegeben von:
writein KlassePatternNode- Löst aus:
IOException
-
read
- Löst aus:
IOException
-
matches
For declare atConstructor, atMethod, atField -
matches
For declare atType. -
setAspect
-
getAspect
-
copyAnnotationTo
-
getAnnotation
- Gibt zurück:
- declared annotation; can be null for annotations with SOURCE retention, which of course are not present in the byte code
-
getTypePattern
-
getSignaturePattern
-
isStarredAnnotationPattern
public boolean isStarredAnnotationPattern() -
getKind
-
isDeclareAtConstuctor
public boolean isDeclareAtConstuctor() -
isDeclareAtMethod
public boolean isDeclareAtMethod() -
isDeclareAtType
public boolean isDeclareAtType() -
isDeclareAtField
public boolean isDeclareAtField() -
getAnnotationType
- Gibt zurück:
- the type of the annotation; can be null for annotations with SOURCE retention, which of course are not present in the byte code
-
isAnnotationAllowedOnField
public boolean isAnnotationAllowedOnField()- Gibt zurück:
- true if the annotation specified is allowed on a field
-
getPatternAsString
-
couldEverMatch
Return true if this declare annotation could ever match something in the specified type - only really able to make intelligent decision if a type was specified in the sig/type pattern signature. -
getNameSuffix
Provide a name suffix so that we can tell the different declare annotations forms apart in the AjProblemReporter- Angegeben von:
getNameSuffixin KlasseDeclare
-
setRemover
public void setRemover(boolean b) -
isRemover
public boolean isRemover()
-