Package icyllis.arc3d.compiler.tree

# Class VariableDecl

java.lang.Object
icyllis.arc3d.compiler.tree.Node
icyllis.arc3d.compiler.tree.Statement
icyllis.arc3d.compiler.tree.VariableDecl

public final class VariableDecl extends Statement
Variable declaration.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class icyllis.arc3d.compiler.tree.Node

  `Node.ElementKind, Node.ExpressionKind, Node.StatementKind, Node.SymbolKind`

- ## Field Summary

  ### Fields inherited from class icyllis.arc3d.compiler.tree.Node

  `mPosition`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `VariableDecl(Variable variable, Expression init)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `accept(TreeVisitor visitor)`
  Visit this AST with a given visitor.
  `static void`
  `checkError(int pos, Modifiers modifiers, Type type, Type baseType, byte storage)`
  `static VariableDecl`
  `convert(Context context, int pos, Modifiers modifiers, Type type, String name, byte storage, Expression init)`
  `static VariableDecl`
  `convert(Context context, Variable variable, Expression init)`
  `Expression`
  `getInit()`
  `Node.StatementKind`
  `getKind()`
  `Variable`
  `getVariable()`
  `static VariableDecl`
  `make(Variable variable, Expression init)`
  `void`
  `setInit(Expression init)`
  `void`
  `setVariable(Variable variable)`
  `String`
  `toString()`

  ### Methods inherited from class icyllis.arc3d.compiler.tree.Statement

  `isEmpty`

  ### Methods inherited from class icyllis.arc3d.compiler.tree.Node

  `getEndOffset, getStartOffset`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### VariableDecl

    public VariableDecl(Variable variable, Expression init)

- ## Method Details

  - ### checkError

    public static void checkError(int pos, Modifiers modifiers, Type type, Type baseType, byte storage)

  - ### convert

    @Nullable public static VariableDecl convert(@Nonnull Context context, int pos, @Nonnull Modifiers modifiers, @Nonnull Type type, @Nonnull String name, byte storage, @Nullable Expression init)

  - ### convert

    @Nullable public static VariableDecl convert(@Nonnull Context context, @Nonnull Variable variable, @Nullable Expression init)

  - ### make

    @Nonnull public static VariableDecl make(Variable variable, Expression init)

  - ### getVariable

    public Variable getVariable()

  - ### setVariable

    public void setVariable(Variable variable)

  - ### getInit

    public Expression getInit()

  - ### setInit

    public void setInit(Expression init)

  - ### getKind

    public Node.StatementKind getKind()
    Specified by:
      `getKind` in class `Statement`
    See Also:
      - `Node.StatementKind`

  - ### accept

    public boolean accept(@Nonnull TreeVisitor visitor)
    Description copied from class: `Node`
    Visit this AST with a given visitor.
    Specified by:
      `accept` in class `Node`
    Returns:
      true to stop recursion and propagate true up the stack, false to continue

  - ### toString

    @Nonnull public String toString()
    Specified by:
      `toString` in class `Node`
    Returns:
      a string representation of this AST node