Represents an annotation which can be attached to interfaces, classes, methods and fields.
Modifiers | Name | Description |
---|---|---|
static int |
ANNOTATION_TARGET |
|
static int |
CONSTRUCTOR_TARGET |
|
static int |
FIELD_TARGET |
|
static int |
LOCAL_VARIABLE_TARGET |
|
static int |
METHOD_TARGET |
|
static int |
PACKAGE_TARGET |
|
static int |
PARAMETER_TARGET |
|
static int |
TYPE_TARGET |
Constructor and description |
---|
AnnotationNode
(ClassNode classNode) |
Type | Name and description |
---|---|
void |
addMember(String name, Expression value) |
ClassNode |
getClassNode() |
Expression |
getMember(String name) |
Map<String, Expression> |
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) |
Methods inherited from class | Name |
---|---|
class ASTNode |
copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getNodeMetaData, getNodeMetaData, getText, putNodeMetaData, removeNodeMetaData, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setNodeMetaData, setSourcePosition, visit |
class Object |
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Flag corresponding to RetentionPolicy.CLASS
.
Flag corresponding to RetentionPolicy
.
Flag corresponding to RetentionPolicy.SOURCE
.
Sets the internal flag if the current annotation has
RetentionPolicy.CLASS
.
Sets the internal flag of this annotation runtime retention policy.
If the current annotation has
RetentionPolicy.RUNTIME
or if false
if the RetentionPolicy.CLASS
.
flag
- if true then current annotation is marked as having
RetentionPolicy.RUNTIME
. If false then
the annotation has RetentionPolicy.CLASS
. Sets the internal flag if the current annotation has
RetentionPolicy.SOURCE
.
Copyright © 2003-2014 The Codehaus. All rights reserved.