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
Modifizierer und TypKlasseBeschreibungstatic class
Captures type of declare annotation (method/type/field/constructor) -
Feldübersicht
Modifizierer und TypFeldBeschreibungstatic final DeclareAnnotation.Kind
static final DeclareAnnotation.Kind
static final DeclareAnnotation.Kind
static final DeclareAnnotation.Kind
static final DeclareAnnotation.Kind
Von Klasse geerbte Felder org.aspectj.weaver.patterns.Declare
ANNOTATION, DOMINATES, ERROR_OR_WARNING, PARENTS, PARENTSMIXIN, SOFT, TYPE_ERROR_OR_WARNING
Von Klasse geerbte Felder org.aspectj.weaver.patterns.PatternNode
end, sourceContext, start
-
Konstruktorübersicht
KonstruktorBeschreibungDeclareAnnotation
(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) void
copyAnnotationTo
(ResolvedType onType) boolean
couldEverMatch
(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.boolean
int
int
Returns 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 AjProblemReporterint
hashCode()
boolean
Indicates if this declare should be treated like advice.boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
matches
(ResolvedMember resolvedmember, World world) For declare atConstructor, atMethod, atFieldboolean
matches
(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 Declare
read
(VersionedDataInputStream s, ISourceContext context) void
Returns this declare mutatedvoid
setAnnotationLocation
(int start, int end) void
setAnnotationMethod
(String methodName) void
setAnnotationString
(String annotationString) void
setAspect
(ResolvedType typeX) void
setRemover
(boolean b) toString()
traverse
(PatternNodeVisitor visitor, Object data) void
Von Klasse geerbte Methoden org.aspectj.weaver.patterns.Declare
getDeclaringType, setDeclaringType
Von 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:
accept
in KlassePatternNode
-
traverse
- Setzt außer Kraft:
traverse
in KlassePatternNode
-
resolve
Beschreibung aus Klasse kopiert:Declare
Returns this declare mutated -
parameterizeWith
Beschreibung aus Klasse kopiert:Declare
Returns a version of this declare element in which all references to type variables are replaced with their bindings given in the map.- Angegeben von:
parameterizeWith
in KlasseDeclare
-
isAdviceLike
public boolean isAdviceLike()Beschreibung aus Klasse kopiert:Declare
Indicates 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:
isAdviceLike
in 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:
write
in 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:
getNameSuffix
in KlasseDeclare
-
setRemover
public void setRemover(boolean b) -
isRemover
public boolean isRemover()
-