Class SwitchCase


public final class SwitchCase extends Statement
A single case of a 'switch' statement.
  • Method Details

    • make

      @Nonnull public static SwitchCase make(int position, long value, Statement statement)
    • makeDefault

      @Nonnull public static SwitchCase makeDefault(int position, Statement statement)
    • isDefault

      public boolean isDefault()
    • getValue

      public long getValue()
    • getStatement

      public Statement getStatement()
    • setStatement

      public void setStatement(Statement statement)
    • getKind

      public Node.StatementKind getKind()
      Specified by:
      getKind in class Statement
      See Also:
    • 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