Top Description Fields Methods
org.aspectj.weaver

public Interface AnnotationAJ

Known Direct Implementers
org.aspectj.weaver.AbstractAnnotationAJ
Imports
java.util.Set

Simple representation of an annotation that the weaver can work with.
Author
AndyClement

Field Summary

Modifier and TypeField and Description
public static final AnnotationAJ[]

Method Summary

Modifier and TypeMethod and Description
public boolean
allowedOnAnnotationType()

return true if this annotation can target an annotation type

public boolean

Returns:

true if this annotation can be put on a field
allowedOnField
()

public boolean

Returns:

true if this annotation can target a 'regular' type. A 'regular' type is enum/class/interface - it is *not* annotation.
allowedOnRegularType
()

public String

Returns:

string representation of the value of that field, may be null if no such field set
getStringFormOfValue
(String
the name of the annotation field being looked up
name
)

Determine the string representation of the value of a field.

public Set<String>

Returns:

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.
getTargets
()

public ResolvedType

Returns:

the type of the annotation
getType
()

public String

Returns:

the type name for the annotation, eg. com.foo.MyAnno
getTypeName
()

public String

Returns:

the signature for the annotation type, eg. Lcom/foo/MyAnno;
getTypeSignature
()

public String

Returns:

String representation of the valid targets for this annotation, eg. "{TYPE,FIELD}"
getValidTargets
()

public boolean

Returns:

true if there is a value with that name
hasNamedValue
(String
the name of the value
name
)

public boolean

Returns:

true if there is a value with the specified name and value
hasNameValuePair
(String
the name of the annotation field
name
,
String
the value of the annotation field
value
)

public boolean

Returns:

true if the annotation is marked for runtime visibility
isRuntimeVisible
()

public boolean

Returns:

true if this annotation is marked with @target
specifiesTarget
()

public String

Returns:

String form of the annotation and any values, eg. @Foo(a=b,c=d)
stringify
()

Field Detail

EMPTY_ARRAYback to summary
public static final AnnotationAJ[] EMPTY_ARRAY

Method Detail

allowedOnAnnotationTypeback to summary
public boolean allowedOnAnnotationType()

return true if this annotation can target an annotation type

allowedOnFieldback to summary
public boolean allowedOnField()
Returns:boolean

true if this annotation can be put on a field

allowedOnRegularTypeback to summary
public boolean allowedOnRegularType()
Returns:boolean

true if this annotation can target a 'regular' type. A 'regular' type is enum/class/interface - it is *not* annotation.

getStringFormOfValueback to summary
public String getStringFormOfValue(String name)

Determine the string representation of the value of a field. For example in @SuppressAjWarnings({"adviceDidNotMatch"}) the return value for getStringFormOfValue("value") would be "[adviceDidNotMatch]".

Parameters
name:String

the name of the annotation field being looked up

Returns:String

string representation of the value of that field, may be null if no such field set

getTargetsback to summary
public Set<String> getTargets()
Returns:Set<String>

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.

getTypeback to summary
public ResolvedType getType()
Returns:ResolvedType

the type of the annotation

getTypeNameback to summary
public String getTypeName()
Returns:String

the type name for the annotation, eg. com.foo.MyAnno

getTypeSignatureback to summary
public String getTypeSignature()
Returns:String

the signature for the annotation type, eg. Lcom/foo/MyAnno;

getValidTargetsback to summary
public String getValidTargets()
Returns:String

String representation of the valid targets for this annotation, eg. "{TYPE,FIELD}"

hasNamedValueback to summary
public boolean hasNamedValue(String name)
Parameters
name:String

the name of the value

Returns:boolean

true if there is a value with that name

hasNameValuePairback to summary
public boolean hasNameValuePair(String name, String value)
Parameters
name:String

the name of the annotation field

value:String

the value of the annotation field

Returns:boolean

true if there is a value with the specified name and value

isRuntimeVisibleback to summary
public boolean isRuntimeVisible()
Returns:boolean

true if the annotation is marked for runtime visibility

specifiesTargetback to summary
public boolean specifiesTarget()
Returns:boolean

true if this annotation is marked with @target

stringifyback to summary
public String stringify()
Returns:String

String form of the annotation and any values, eg. @Foo(a=b,c=d)