Class SimpleName

java.lang.Object
com.github.javaparser.ast.Node
com.github.javaparser.ast.expr.SimpleName
All Implemented Interfaces:
NodeWithIdentifier<SimpleName>, NodeWithRange<Node>, NodeWithTokenRange<Node>, Observable, Visitable, HasParentNode<Node>, Cloneable

public class SimpleName extends Node implements NodeWithIdentifier<SimpleName>
A name that consists of a single identifier. In other words: it.does.NOT.contain.dots.
See Also:
Name
  • Constructor Details

    • SimpleName

      public SimpleName()
    • SimpleName

      public SimpleName(String identifier)
    • SimpleName

      public SimpleName(TokenRange tokenRange, String identifier)
      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.
      Specified by:
      accept in interface Visitable
      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.
      Specified by:
      accept in interface Visitable
      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)
    • getIdentifier

      public String getIdentifier()
      Specified by:
      getIdentifier in interface NodeWithIdentifier<SimpleName>
    • setIdentifier

      public SimpleName setIdentifier(String identifier)
      Specified by:
      setIdentifier in interface NodeWithIdentifier<SimpleName>
    • asString

      public String asString()
    • clone

      public SimpleName clone()
      Overrides:
      clone in class Node
    • getMetaModel

      public SimpleNameMetaModel getMetaModel()
      Overrides:
      getMetaModel in class Node
      Returns:
      get JavaParser specific node introspection information.