| |
|
| java.lang.Object org.eclipse.jdt.core.dom.ASTNode org.eclipse.jdt.core.dom.Expression org.eclipse.jdt.core.dom.Name org.eclipse.jdt.core.dom.SimpleName
SimpleName | public class SimpleName extends Name (Code) | | AST node for a simple name. A simple name is an identifier other than
a keyword, boolean literal ("true", "false") or null literal ("null").
SimpleName:
Identifier
since: 2.0 |
Constructor Summary | |
| SimpleName(AST ast) Creates a new AST node for a simple name owned by the given AST.
The new node has an unspecified, legal Java identifier.
N.B. |
IDENTIFIER_PROPERTY | final public static SimplePropertyDescriptor IDENTIFIER_PROPERTY(Code) | | The "identifier" structural property of this node type.
since: 3.0 |
SimpleName | SimpleName(AST ast)(Code) | | Creates a new AST node for a simple name owned by the given AST.
The new node has an unspecified, legal Java identifier.
N.B. This constructor is package-private; all subclasses must be
declared in the same package; clients are unable to declare
additional subclasses.
Parameters: ast - the AST that is to own this node |
getIdentifier | public String getIdentifier()(Code) | | Returns this node's identifier.
the identifier of this node |
getNodeType0 | final int getNodeType0()(Code) | | |
internalSetIdentifier | void internalSetIdentifier(String ident)(Code) | | |
internalStructuralPropertiesForType | final List internalStructuralPropertiesForType(int apiLevel)(Code) | | |
isDeclaration | public boolean isDeclaration()(Code) | | Returns whether this simple name represents a name that is being defined,
as opposed to one being referenced. The following positions are considered
ones where a name is defined:
- The type name in a
TypeDeclaration node.
- The method name in a
MethodDeclaration node
providing isConstructor is false .
- The variable name in any type of
VariableDeclaration
node.
- The enum type name in a
EnumDeclaration node.
- The enum constant name in an
EnumConstantDeclaration
node.
- The variable name in an
EnhancedForStatement
node.
- The type variable name in a
TypeParameter
node.
- The type name in an
AnnotationTypeDeclaration node.
- The member name in an
AnnotationTypeMemberDeclaration node.
Note that this is a convenience method that simply checks whether
this node appears in the declaration position relative to its parent.
It always returns false if this node is unparented.
true if this node declares a name, and false otherwise |
propertyDescriptors | public static List propertyDescriptors(int apiLevel)(Code) | | Returns a list of structural property descriptors for this node type.
Clients must not modify the result.
Parameters: apiLevel - the API level; one of the AST.JLS* constants a list of property descriptors (element type: StructuralPropertyDescriptor) since: 3.0 |
setIdentifier | public void setIdentifier(String identifier)(Code) | | Sets the identifier of this node to the given value.
The identifier should be legal according to the rules
of the Java language. Note that keywords are not legal
identifiers.
Note that the list of keywords may depend on the version of the
language (determined when the AST object was created).
Parameters: identifier - the identifier of this node exception: IllegalArgumentException - if the identifier is invalid |
Methods inherited from org.eclipse.jdt.core.dom.ASTNode | final public void accept(ASTVisitor visitor)(Code)(Java Doc) abstract void accept0(ASTVisitor visitor)(Code)(Java Doc) final void acceptChild(ASTVisitor visitor, ASTNode child)(Code)(Java Doc) final void acceptChildren(ASTVisitor visitor, ASTNode.NodeList children)(Code)(Java Doc) static void addProperty(StructuralPropertyDescriptor property, List propertyList)(Code)(Java Doc) void appendDebugString(StringBuffer buffer)(Code)(Java Doc) final void appendPrintString(StringBuffer buffer)(Code)(Java Doc) final void checkModifiable()(Code)(Java Doc) static void checkNewChild(ASTNode node, ASTNode newChild, boolean cycleCheck, Class nodeType)(Code)(Java Doc) final ASTNode clone(AST target)(Code)(Java Doc) abstract ASTNode clone0(AST target)(Code)(Java Doc) public static ASTNode copySubtree(AST target, ASTNode node)(Code)(Java Doc) public static List copySubtrees(AST target, List nodes)(Code)(Java Doc) static void createPropertyList(Class nodeClass, List propertyList)(Code)(Java Doc) final public void delete()(Code)(Java Doc) final public boolean equals(Object obj)(Code)(Java Doc) final public AST getAST()(Code)(Java Doc) final public int getFlags()(Code)(Java Doc) final public int getLength()(Code)(Java Doc) final public StructuralPropertyDescriptor getLocationInParent()(Code)(Java Doc) final public int getNodeType()(Code)(Java Doc) abstract int getNodeType0()(Code)(Java Doc) final public ASTNode getParent()(Code)(Java Doc) final public Object getProperty(String propertyName)(Code)(Java Doc) final public ASTNode getRoot()(Code)(Java Doc) final public int getStartPosition()(Code)(Java Doc) final public Object getStructuralProperty(StructuralPropertyDescriptor property)(Code)(Java Doc) final public int hashCode()(Code)(Java Doc) List internalGetChildListProperty(ChildListPropertyDescriptor property)(Code)(Java Doc) boolean internalGetSetBooleanProperty(SimplePropertyDescriptor property, boolean get, boolean value)(Code)(Java Doc) ASTNode internalGetSetChildProperty(ChildPropertyDescriptor property, boolean get, ASTNode child)(Code)(Java Doc) int internalGetSetIntProperty(SimplePropertyDescriptor property, boolean get, int value)(Code)(Java Doc) Object internalGetSetObjectProperty(SimplePropertyDescriptor property, boolean get, Object value)(Code)(Java Doc) abstract List internalStructuralPropertiesForType(int apiLevel)(Code)(Java Doc) abstract int memSize()(Code)(Java Doc) public static Class nodeClassForType(int nodeType)(Code)(Java Doc) final void postLazyInit(ASTNode newChild, ChildPropertyDescriptor property)(Code)(Java Doc) final void postReplaceChild(ASTNode oldChild, ASTNode newChild, ChildPropertyDescriptor property)(Code)(Java Doc) final void postValueChange(SimplePropertyDescriptor property)(Code)(Java Doc) final void preLazyInit()(Code)(Java Doc) final void preReplaceChild(ASTNode oldChild, ASTNode newChild, ChildPropertyDescriptor property)(Code)(Java Doc) final void preValueChange(SimplePropertyDescriptor property)(Code)(Java Doc) final public Map properties()(Code)(Java Doc) static List reapPropertyList(List propertyList)(Code)(Java Doc) final public void setFlags(int flags)(Code)(Java Doc) final void setParent(ASTNode parent, StructuralPropertyDescriptor property)(Code)(Java Doc) final public void setProperty(String propertyName, Object data)(Code)(Java Doc) final public void setSourceRange(int startPosition, int length)(Code)(Java Doc) final public void setStructuralProperty(StructuralPropertyDescriptor property, Object value)(Code)(Java Doc) final String standardToString()(Code)(Java Doc) static int stringSize(String string)(Code)(Java Doc) final public List structuralPropertiesForType()(Code)(Java Doc) final public int subtreeBytes()(Code)(Java Doc) final public boolean subtreeMatch(ASTMatcher matcher, Object other)(Code)(Java Doc) abstract boolean subtreeMatch0(ASTMatcher matcher, Object other)(Code)(Java Doc) final void supportedOnlyIn2()(Code)(Java Doc) final public String toString()(Code)(Java Doc) abstract int treeSize()(Code)(Java Doc) final void unsupportedIn2()(Code)(Java Doc)
|
|
|
|