Local variable declaration statement AST node type.
This kind of node collects several variable declaration fragments (VariableDeclarationFragment
) into a statement (Statement
), all sharing the same modifiers and base type.
For JLS2:
VariableDeclarationStatement: { Modifier } Type VariableDeclarationFragment { , VariableDeclarationFragment } ;
For JLS3, the modifier flags were replaced by a list of modifier nodes (intermixed with annotations):
VariableDeclarationStatement: { ExtendedModifier } Type VariableDeclarationFragment { , VariableDeclarationFragment } ;
Note: This type of node is a convenience of sorts. An equivalent way to represent the same statement is to use a VariableDeclarationExpression
wrapped in an ExpressionStatement
.
@since 2.0
@noinstantiate This class is not intended to be instantiated by clients.