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 Details

    • name

      public final 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 Details

  • Method Details

    • setEnclosingScope

      public void setEnclosingScope(Java.Scope s)
      Sets the immediately enclosing scope for the (optional) initializer.
    • toString

      public String toString()
      Overrides:
      toString in class Object