Class Java.VariableDeclarator
java.lang.Object
org.codehaus.janino.Java.Located
org.codehaus.janino.Java.VariableDeclarator
- All Implemented Interfaces:
Java.Locatable
- Enclosing class:
Java
Used by FieldDeclaration and LocalVariableDeclarationStatement.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intThe number of "[]"s after the name.The initializer for the variable, if any.Used only if the variable declarator declares a local variable.final StringThe name of this field or local variable.Fields inherited from class Java.Located
NOWHERE -
Constructor Summary
ConstructorsConstructorDescriptionVariableDeclarator(Location location, String name, int brackets, Java.ArrayInitializerOrRvalue initializer) -
Method Summary
Modifier and TypeMethodDescriptionvoidSets the immediately enclosing scope for the (optional) initializer.toString()Methods inherited from class Java.Located
getLocation, throwCompileException
-
Field Details
-
name
The name of this field or local variable. -
brackets
public final int bracketsThe number of "[]"s after the name. -
initializer
The initializer for the variable, if any. -
localVariable
Used only if the variable declarator declares a local variable.
-
-
Constructor Details
-
VariableDeclarator
public VariableDeclarator(Location location, String name, int brackets, @Nullable Java.ArrayInitializerOrRvalue initializer)
-
-
Method Details
-
setEnclosingScope
Sets the immediately enclosing scope for the (optional) initializer. -
toString
-