Package org.codehaus.janino
Class Java.VariableDeclarator
- java.lang.Object
-
- org.codehaus.janino.Java.Located
-
- org.codehaus.janino.Java.VariableDeclarator
-
- All Implemented Interfaces:
Java.Locatable
- Enclosing class:
- Java
public static final class Java.VariableDeclarator extends Java.Located
Used by FieldDeclaration and LocalVariableDeclarationStatement.
-
-
Field Summary
Fields Modifier and Type Field Description int
brackets
The number of "[]"s after the name.Java.ArrayInitializerOrRvalue
initializer
The initializer for the variable, if any.Java.LocalVariable
localVariable
Used only if the variable declarator declares a local variable.java.lang.String
name
The name of this field or local variable.-
Fields inherited from class org.codehaus.janino.Java.Located
NOWHERE
-
-
Constructor Summary
Constructors Constructor Description VariableDeclarator(Location location, java.lang.String name, int brackets, Java.ArrayInitializerOrRvalue initializer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setEnclosingScope(Java.Scope s)
Sets the immediately enclosing scope for the (optional) initializer.java.lang.String
toString()
-
Methods inherited from class org.codehaus.janino.Java.Located
getLocation, throwCompileException
-
-
-
-
Field Detail
-
name
public final java.lang.String name
The name of this field or local variable.
-
brackets
public final int brackets
The number of "[]"s after the name.
-
initializer
@Nullable public final Java.ArrayInitializerOrRvalue initializer
The initializer for the variable, if any.
-
localVariable
@Nullable public Java.LocalVariable localVariable
Used only if the variable declarator declares a local variable.
-
-
Constructor Detail
-
VariableDeclarator
public VariableDeclarator(Location location, java.lang.String name, int brackets, @Nullable Java.ArrayInitializerOrRvalue initializer)
-
-
Method Detail
-
setEnclosingScope
public void setEnclosingScope(Java.Scope s)
Sets the immediately enclosing scope for the (optional) initializer.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-