|
Eclipse JDT Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jdt.core.dom.ASTNode
org.eclipse.jdt.core.dom.BodyDeclaration
org.eclipse.jdt.core.dom.AnnotationTypeMemberDeclaration
Annotation type member declaration AST node type (added in JLS3 API).
AnnotationTypeMemberDeclaration: [ Javadoc ] { ExtendedModifier } Type Identifier ( ) [ default Expression ] ;
Note that annotation type member declarations are only meaningful as
elements of AbstractTypeDeclaration.bodyDeclarations()
.
When a Javadoc comment is present, the source range begins with the first character of the "/**" comment delimiter. When there is no Javadoc comment, the source range begins with the first character of the first modifier keyword (if modifiers), or the first character of the member type (no modifiers). The source range extends through the last character of the ";" token.
Field Summary | |
---|---|
static ChildPropertyDescriptor |
DEFAULT_PROPERTY
The "default" structural property of this node type. |
static ChildPropertyDescriptor |
JAVADOC_PROPERTY
The "javadoc" structural property of this node type. |
static ChildListPropertyDescriptor |
MODIFIERS2_PROPERTY
The "modifiers" structural property of this node type. |
static ChildPropertyDescriptor |
NAME_PROPERTY
The "name" structural property of this node type. |
static ChildPropertyDescriptor |
TYPE_PROPERTY
The "type" structural property of this node type. |
Method Summary | |
---|---|
Expression |
getDefault()
Returns the default value of this annotation type member, or null if there is none. |
SimpleName |
getName()
Returns the name of the annotation type member declared in this declaration. |
Type |
getType()
Returns the type of the annotation type member declared in this declaration. |
static List |
propertyDescriptors(int apiLevel)
Returns a list of structural property descriptors for this node type. |
IMethodBinding |
resolveBinding()
Resolves and returns the binding for the annotation type member declared in this declaration. |
void |
setDefault(Expression defaultValue)
Sets or clears the default value of this annotation type member. |
void |
setName(SimpleName memberName)
Sets the name of the annotation type member declared in this declaration to the given name. |
void |
setType(Type type)
Sets the type of the annotation type member declared in this declaration to the given type. |
Methods inherited from class org.eclipse.jdt.core.dom.BodyDeclaration |
---|
getJavadoc, getJavadocProperty, getModifiers, getModifiersProperty, modifiers, setJavadoc, setModifiers |
Methods inherited from class org.eclipse.jdt.core.dom.ASTNode |
---|
accept, copySubtree, copySubtrees, delete, equals, getAST, getFlags, getLength, getLocationInParent, getNodeType, getParent, getProperty, getRoot, getStartPosition, getStructuralProperty, nodeClassForType, properties, setFlags, setProperty, setSourceRange, setStructuralProperty, structuralPropertiesForType, subtreeBytes, subtreeMatch, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final ChildPropertyDescriptor JAVADOC_PROPERTY
public static final ChildListPropertyDescriptor MODIFIERS2_PROPERTY
public static final ChildPropertyDescriptor NAME_PROPERTY
public static final ChildPropertyDescriptor TYPE_PROPERTY
public static final ChildPropertyDescriptor DEFAULT_PROPERTY
Method Detail |
public static List propertyDescriptors(int apiLevel)
apiLevel
- the API level; one of the
AST.JLS*
constants
StructuralPropertyDescriptor
)public SimpleName getName()
public void setName(SimpleName memberName)
memberName
- the new member name
IllegalArgumentException
- if:
public Type getType()
public void setType(Type type)
type
- the new member type
IllegalArgumentException
- if:
public Expression getDefault()
null
if there is none.
null
if there is nonepublic void setDefault(Expression defaultValue)
defaultValue
- the expression node, or null
if
there is none
IllegalArgumentException
- if:
public IMethodBinding resolveBinding()
Note that bindings are generally unavailable unless requested when the AST is being built.
null
if the binding cannot be
resolved
|
Eclipse JDT Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |