| |
|
| java.lang.Object org.eclipse.jdt.core.dom.ASTNode org.eclipse.jdt.core.dom.Expression org.eclipse.jdt.core.dom.VariableDeclarationExpression
VariableDeclarationExpression | public class VariableDeclarationExpression extends Expression (Code) | | Local variable declaration expression AST node type.
This kind of node collects together several variable declaration fragments
(VariableDeclarationFragment ) into a single expression
(Expression ), all sharing the same modifiers and base type.
This type of node can be used as the initializer of a
ForStatement , or wrapped in an ExpressionStatement
to form the equivalent of a VariableDeclarationStatement .
For JLS2:
VariableDeclarationExpression:
{ Modifier } Type VariableDeclarationFragment
{ , VariableDeclarationFragment }
For JLS3, the modifier flags were replaced by
a list of modifier nodes (intermixed with annotations):
VariableDeclarationExpression:
{ ExtendedModifier } Type VariableDeclarationFragment
{ , VariableDeclarationFragment }
since: 2.0 |
MODIFIERS2_PROPERTY | final public static ChildListPropertyDescriptor MODIFIERS2_PROPERTY(Code) | | The "modifiers" structural property of this node type (added in JLS3 API).
since: 3.1 |
MODIFIERS_PROPERTY | final public static SimplePropertyDescriptor MODIFIERS_PROPERTY(Code) | | The "modifiers" structural property of this node type (JLS2 API only).
since: 3.0 |
VariableDeclarationExpression | VariableDeclarationExpression(AST ast)(Code) | | Creates a new unparented local variable declaration expression node
owned by the given AST. By default, the variable declaration has: no
modifiers, an unspecified (but legal) type, and an empty list of variable
declaration fragments (which is syntactically illegal).
N.B. This constructor is package-private.
Parameters: ast - the AST that is to own this node |
fragments | public List fragments()(Code) | | Returns the live list of variable declaration fragments in this
expression. Adding and removing nodes from this list affects this node
dynamically. All nodes in this list must be
VariableDeclarationFragment s; attempts to add any other
type of node will trigger an exception.
the live list of variable declaration fragments in this expression (element type: VariableDeclarationFragment ) |
getModifiers | public int getModifiers()(Code) | | Returns the modifiers explicitly specified on this declaration.
In the JLS3 API, this method is a convenience method that
computes these flags from modifiers() .
the bit-wise or of Modifier constants See Also: Modifier |
getNodeType0 | final int getNodeType0()(Code) | | |
getType | public Type getType()(Code) | | Returns the base type declared in this variable declaration.
N.B. The individual child variable declaration fragments may specify
additional array dimensions. So the type of the variable are not
necessarily exactly this type.
the base type |
internalSetModifiers | final void internalSetModifiers(int pmodifiers)(Code) | | Internal synonym for deprecated method. Used to avoid
deprecation warnings.
since: 3.1 |
internalStructuralPropertiesForType | final List internalStructuralPropertiesForType(int apiLevel)(Code) | | |
modifiers | public List modifiers()(Code) | | Returns the live ordered list of modifiers and annotations
of this declaration (added in JLS3 API).
Note that the final modifier is the only meaningful modifier for local
variable declarations.
the live list of modifiers and annotations(element type: IExtendedModifier ) exception: UnsupportedOperationException - if this operation is used ina JLS2 AST since: 3.1 |
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 theAST.JLS* constants a list of property descriptors (element type: StructuralPropertyDescriptor) since: 3.0 |
setModifiers | public void setModifiers(int modifiers)(Code) | | Sets the modifiers explicitly specified on this declaration (JLS2 API only).
Note that the final modifier is the only meaningful modifier for local
variable declarations.
Parameters: modifiers - the given modifiers (bit-wise or of Modifier constants) exception: UnsupportedOperationException - if this operation is used inan AST later than JLS2 See Also: ModifierVariableDeclarationExpression.modifiers() |
setType | public void setType(Type type)(Code) | | Sets the base type declared in this variable declaration to the given
type.
Parameters: type - the new base type exception: IllegalArgumentException - if:- the node belongs to a different AST
- the node already has a parent
|
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)
|
|
|
|