|
|||||
| FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||
Represents an annotation which can be attached to interfaces, classes, methods and fields.
| Field Summary | |
|---|---|
int |
ALL_TARGETS
|
int |
ANNOTATION_TARGET
|
int |
CONSTRUCTOR_TARGET
|
int |
FIELD_TARGET
|
int |
LOCAL_VARIABLE_TARGET
|
int |
METHOD_TARGET
|
int |
PACKAGE_TARGET
|
int |
PARAMETER_TARGET
|
int |
TYPE_TARGET
|
int |
allowedTargets
|
ClassNode |
classNode
|
boolean |
classRetention
|
Map |
members
|
boolean |
runtimeRetention
|
boolean |
sourceRetention
|
| Constructor Summary | |
AnnotationNode(ClassNode classNode)
|
|
| Method Summary | |
|---|---|
void |
addMember(String name, Expression value)
|
ClassNode |
getClassNode()
|
Expression |
getMember(String name)
|
Map |
getMembers()
|
boolean |
hasClassRetention()
Flag corresponding to RetentionPolicy.CLASS.
|
boolean |
hasRuntimeRetention()
Flag corresponding to RetentionPolicy.
|
boolean |
hasSourceRetention()
Flag corresponding to RetentionPolicy.SOURCE.
|
boolean |
isBuiltIn()
|
boolean |
isTargetAllowed(int target)
|
void |
setAllowedTargets(int bitmap)
|
void |
setClassRetention(boolean flag)
Sets the internal flag if the current annotation has RetentionPolicy.CLASS.
|
void |
setMember(String name, Expression value)
|
void |
setRuntimeRetention(boolean flag)
Sets the internal flag of this annotation runtime retention policy. |
void |
setSourceRetention(boolean flag)
Sets the internal flag if the current annotation has RetentionPolicy.SOURCE.
|
static String |
targetToName(int target)
|
| Constructor Detail |
|---|
public AnnotationNode(ClassNode classNode)
| Method Detail |
|---|
public void addMember(String name, Expression value)
public ClassNode getClassNode()
public Expression getMember(String name)
public Map getMembers()
public boolean hasClassRetention()
RetentionPolicy.CLASS.
public boolean hasRuntimeRetention()
RetentionPolicy.
public boolean hasSourceRetention()
RetentionPolicy.SOURCE.
public boolean isBuiltIn()
public boolean isTargetAllowed(int target)
public void setAllowedTargets(int bitmap)
public void setClassRetention(boolean flag)
RetentionPolicy.CLASS.
public void setMember(String name, Expression value)
public void setRuntimeRetention(boolean flag)
RetentionPolicy.RUNTIME or if false
if the RetentionPolicy.CLASS.
RetentionPolicy.RUNTIME. If false then
the annotation has RetentionPolicy.CLASS.
public void setSourceRetention(boolean flag)
RetentionPolicy.SOURCE.
public static String targetToName(int target)