Package org.aspectj.weaver
Class AbstractAnnotationAJ
java.lang.Object
org.aspectj.weaver.AbstractAnnotationAJ
- All Implemented Interfaces:
AnnotationAJ
- Direct Known Subclasses:
BcelAnnotation,StandardAnnotation
-
Field Summary
FieldsFields inherited from interface org.aspectj.weaver.AnnotationAJ
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanreturn true if this annotation can target an annotation typefinal booleanfinal booleanfinal voidfinal ResolvedTypegetType()final Stringfinal Stringfinal Stringabstract booleanhasNamedValue(String name) abstract booleanhasNameValuePair(String name, String value) abstract booleanfinal booleanabstract StringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.aspectj.weaver.AnnotationAJ
getStringFormOfValue
-
Field Details
-
type
-
-
Constructor Details
-
AbstractAnnotationAJ
-
-
Method Details
-
getType
- Specified by:
getTypein interfaceAnnotationAJ- Returns:
- the type of the annotation
-
getTypeSignature
- Specified by:
getTypeSignaturein interfaceAnnotationAJ- Returns:
- the signature for the annotation type, eg. Lcom/foo/MyAnno;
-
getTypeName
- Specified by:
getTypeNamein interfaceAnnotationAJ- Returns:
- the type name for the annotation, eg. com.foo.MyAnno
-
allowedOnAnnotationType
public final boolean allowedOnAnnotationType()return true if this annotation can target an annotation type- Specified by:
allowedOnAnnotationTypein interfaceAnnotationAJ
-
allowedOnField
public final boolean allowedOnField()- Specified by:
allowedOnFieldin interfaceAnnotationAJ- Returns:
- true if this annotation can be put on a field
-
allowedOnRegularType
public final boolean allowedOnRegularType()- Specified by:
allowedOnRegularTypein interfaceAnnotationAJ- Returns:
- true if this annotation can target a 'regular' type. A 'regular' type is enum/class/interface - it is *not* annotation.
-
ensureAtTargetInitialized
public final void ensureAtTargetInitialized() -
getValidTargets
- Specified by:
getValidTargetsin interfaceAnnotationAJ- Returns:
- String representation of the valid targets for this annotation, eg. "{TYPE,FIELD}"
-
specifiesTarget
public final boolean specifiesTarget()- Specified by:
specifiesTargetin interfaceAnnotationAJ- Returns:
- true if this annotation is marked with @target
-
isRuntimeVisible
public abstract boolean isRuntimeVisible()- Specified by:
isRuntimeVisiblein interfaceAnnotationAJ- Returns:
- true if the annotation is marked for runtime visibility
-
getTargets
- Specified by:
getTargetsin interfaceAnnotationAJ- 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.
-
hasNameValuePair
- Specified by:
hasNameValuePairin interfaceAnnotationAJ- Parameters:
name- the name of the annotation fieldvalue- the value of the annotation field- Returns:
- true if there is a value with the specified name and value
-
hasNamedValue
- Specified by:
hasNamedValuein interfaceAnnotationAJ- Parameters:
name- the name of the value- Returns:
- true if there is a value with that name
-
stringify
- Specified by:
stringifyin interfaceAnnotationAJ- Returns:
- String form of the annotation and any values, eg. @Foo(a=b,c=d)
-