|
Groovy 1.7.0 | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.codehaus.groovy.ast.ASTNode
org.codehaus.groovy.ast.AnnotationNode
class AnnotationNode extends ASTNode
Represents an annotation which can be attached to interfaces, classes, methods and fields.
| Field Summary | |
|---|---|
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 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 |
boolean
|
hasRuntimeRetention()
Flag corresponding to |
boolean
|
hasSourceRetention()
Flag corresponding to |
boolean
|
isBuiltIn()
|
boolean
|
isTargetAllowed(int target)
|
void
|
setAllowedTargets(int bitmap)
|
void
|
setClassRetention(boolean flag)
Sets the internal flag if the current annotation has
|
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
|
static String
|
targetToName(int target)
|
| Methods inherited from class ASTNode | |
|---|---|
| getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getText, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setSourcePosition, visit |
| Methods inherited from class Object | |
|---|---|
| wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll |
| Field Detail |
|---|
static final int ANNOTATION_TARGET
static final int CONSTRUCTOR_TARGET
static final int FIELD_TARGET
static final int LOCAL_VARIABLE_TARGET
static final int METHOD_TARGET
static final int PACKAGE_TARGET
static final int PARAMETER_TARGET
static final int TYPE_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)
Copyright © 2003-2009 The Codehaus. All rights reserved.