Class UnparsableStmt

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

public class UnparsableStmt extends Statement
A statement that had parse errors. Nothing is known about it except the tokens it covers.
  • Constructor Details

    • UnparsableStmt

      public UnparsableStmt()
    • UnparsableStmt

      public UnparsableStmt(TokenRange tokenRange)
      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)
    • clone

      public UnparsableStmt clone()
      Overrides:
      clone in class Statement
    • getMetaModel

      public UnparsableStmtMetaModel getMetaModel()
      Overrides:
      getMetaModel in class Statement
      Returns:
      get JavaParser specific node introspection information.
    • getParsed

      public Node.Parsedness getParsed()
      Overrides:
      getParsed in class Node
      Returns:
      whether this node was successfully parsed or not. If it was not, only the range and tokenRange fields will be valid.
    • isUnparsableStmt

      public boolean isUnparsableStmt()
      Overrides:
      isUnparsableStmt in class Statement
    • asUnparsableStmt

      public UnparsableStmt asUnparsableStmt()
      Overrides:
      asUnparsableStmt in class Statement
    • ifUnparsableStmt

      public void ifUnparsableStmt(Consumer<UnparsableStmt> action)
      Overrides:
      ifUnparsableStmt in class Statement
    • toUnparsableStmt

      public Optional<UnparsableStmt> toUnparsableStmt()
      Overrides:
      toUnparsableStmt in class Statement