Package org.aspectj.weaver
Schnittstelle AnnotationAJ
- Alle bekannten Implementierungsklassen:
AbstractAnnotationAJ
,BcelAnnotation
,StandardAnnotation
public interface AnnotationAJ
Simple representation of an annotation that the weaver can work with.
- Autor:
- AndyClement
-
Feldübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
return true if this annotation can target an annotation typeboolean
boolean
getStringFormOfValue
(String name) Determine the string representation of the value of a field.getType()
boolean
hasNamedValue
(String name) boolean
hasNameValuePair
(String name, String value) boolean
boolean
-
Felddetails
-
EMPTY_ARRAY
-
-
Methodendetails
-
getTypeSignature
String getTypeSignature()- Gibt zurück:
- the signature for the annotation type, eg. Lcom/foo/MyAnno;
-
getTypeName
String getTypeName()- Gibt zurück:
- the type name for the annotation, eg. com.foo.MyAnno
-
getType
ResolvedType getType()- Gibt zurück:
- the type of the annotation
-
allowedOnAnnotationType
boolean allowedOnAnnotationType()return true if this annotation can target an annotation type -
allowedOnField
boolean allowedOnField()- Gibt zurück:
- true if this annotation can be put on a field
-
allowedOnRegularType
boolean allowedOnRegularType()- Gibt zurück:
- true if this annotation can target a 'regular' type. A 'regular' type is enum/class/interface - it is *not* annotation.
-
getTargets
- Gibt zurück:
- for the @target annotation, this will return a set of the element-types it can be applied to. For other annotations , it returns the empty set.
-
hasNamedValue
- Parameter:
name
- the name of the value- Gibt zurück:
- true if there is a value with that name
-
hasNameValuePair
- Parameter:
name
- the name of the annotation fieldvalue
- the value of the annotation field- Gibt zurück:
- true if there is a value with the specified name and value
-
getValidTargets
String getValidTargets()- Gibt zurück:
- String representation of the valid targets for this annotation, eg. "{TYPE,FIELD}"
-
stringify
String stringify()- Gibt zurück:
- String form of the annotation and any values, eg. @Foo(a=b,c=d)
-
specifiesTarget
boolean specifiesTarget()- Gibt zurück:
- true if this annotation is marked with @target
-
isRuntimeVisible
boolean isRuntimeVisible()- Gibt zurück:
- true if the annotation is marked for runtime visibility
-
getStringFormOfValue
Determine the string representation of the value of a field. For example in @SuppressAjWarnings({"adviceDidNotMatch"}) the return value for getStringFormOfValue("value") would be "[adviceDidNotMatch]".- Parameter:
name
- the name of the annotation field being looked up- Gibt zurück:
- string representation of the value of that field, may be null if no such field set
-