Class BooleanLiteralExpr

All Implemented Interfaces:
NodeWithRange<Node>, NodeWithTokenRange<Node>, Observable, Visitable, HasParentNode<Node>, Cloneable

public class BooleanLiteralExpr extends LiteralExpr
The boolean literals.
true
false
Author:
Julio Vilmar Gesser
  • Constructor Details

    • BooleanLiteralExpr

      public BooleanLiteralExpr()
    • BooleanLiteralExpr

      public BooleanLiteralExpr(boolean value)
    • BooleanLiteralExpr

      public BooleanLiteralExpr(TokenRange tokenRange, boolean value)
      This constructor is used by the parser and is considered private.
  • Method Details

    • accept

      public <R,​ A> R accept(GenericVisitor<R,​A> v, A arg)
      Description copied from interface: Visitable
      Accept method for visitor support.
      Type Parameters:
      R - the type of the return value of the visitor
      A - the type the user argument passed to the visitor
      Parameters:
      v - the visitor implementation
      arg - the argument passed to the visitor (of type A)
      Returns:
      the result of the visit (of type R)
    • accept

      public <A> void accept(VoidVisitor<A> v, A arg)
      Description copied from interface: Visitable
      Accept method for visitor support.
      Type Parameters:
      A - the type the argument passed for the visitor
      Parameters:
      v - the visitor implementation
      arg - any value relevant for the visitor (of type A)
    • isValue

      public boolean isValue()
      The code generator likes to generate an "is" getter for boolean, so this here is the generated version, but "getValue" does the same and makes more sense.
    • getValue

      public boolean getValue()
    • setValue

      public BooleanLiteralExpr setValue(boolean value)
    • clone

      public BooleanLiteralExpr clone()
      Overrides:
      clone in class LiteralExpr
    • getMetaModel

      public BooleanLiteralExprMetaModel getMetaModel()
      Overrides:
      getMetaModel in class LiteralExpr
      Returns:
      get JavaParser specific node introspection information.
    • isBooleanLiteralExpr

      public boolean isBooleanLiteralExpr()
      Overrides:
      isBooleanLiteralExpr in class Expression
    • asBooleanLiteralExpr

      public BooleanLiteralExpr asBooleanLiteralExpr()
      Overrides:
      asBooleanLiteralExpr in class Expression
    • ifBooleanLiteralExpr

      public void ifBooleanLiteralExpr(Consumer<BooleanLiteralExpr> action)
      Overrides:
      ifBooleanLiteralExpr in class Expression
    • toBooleanLiteralExpr

      public Optional<BooleanLiteralExpr> toBooleanLiteralExpr()
      Overrides:
      toBooleanLiteralExpr in class Expression