Package org.aspectj.weaver
Class AbstractAnnotationAJ
java.lang.Object
org.aspectj.weaver.AbstractAnnotationAJ
- All Implemented Interfaces:
AnnotationAJ
- Direct Known Subclasses:
BcelAnnotation
,StandardAnnotation
-
Field Summary
Fields inherited from interface org.aspectj.weaver.AnnotationAJ
EMPTY_ARRAY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
return true if this annotation can target an annotation typeboolean
boolean
void
getType()
abstract boolean
hasNamedValue(String name)
abstract boolean
hasNameValuePair(String name, String value)
abstract boolean
boolean
abstract String
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.aspectj.weaver.AnnotationAJ
getStringFormOfValue
-
Field Details
-
type
-
-
Constructor Details
-
AbstractAnnotationAJ
-
-
Method Details
-
getType
- Specified by:
getType
in interfaceAnnotationAJ
- Returns:
- the type of the annotation
-
getTypeSignature
- Specified by:
getTypeSignature
in interfaceAnnotationAJ
- Returns:
- the signature for the annotation type, eg. Lcom/foo/MyAnno;
-
getTypeName
- Specified by:
getTypeName
in 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:
allowedOnAnnotationType
in interfaceAnnotationAJ
-
allowedOnField
public final boolean allowedOnField()- Specified by:
allowedOnField
in interfaceAnnotationAJ
- Returns:
- true if this annotation can be put on a field
-
allowedOnRegularType
public final boolean allowedOnRegularType()- Specified by:
allowedOnRegularType
in 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:
getValidTargets
in interfaceAnnotationAJ
- Returns:
- String representation of the valid targets for this annotation, eg. "{TYPE,FIELD}"
-
specifiesTarget
public final boolean specifiesTarget()- Specified by:
specifiesTarget
in interfaceAnnotationAJ
- Returns:
- true if this annotation is marked with @target
-
isRuntimeVisible
public abstract boolean isRuntimeVisible()- Specified by:
isRuntimeVisible
in interfaceAnnotationAJ
- Returns:
- true if the annotation is marked for runtime visibility
-
getTargets
- Specified by:
getTargets
in 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:
hasNameValuePair
in 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:
hasNamedValue
in interfaceAnnotationAJ
- Parameters:
name
- the name of the value- Returns:
- true if there is a value with that name
-
stringify
- Specified by:
stringify
in interfaceAnnotationAJ
- Returns:
- String form of the annotation and any values, eg. @Foo(a=b,c=d)
-