Class Name

    • Constructor Detail

      • Name

        public Name()
      • Name

        public Name​(String identifier)
      • Name

        public Name​(Name qualifier,
                    String identifier)
      • Name

        public Name​(TokenRange tokenRange,
                    Name qualifier,
                    String identifier)
        This constructor is used by the parser and is considered private.
    • Method Detail

      • 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)
      • parse

        @Deprecated
        public static Name parse​(String qualifiedName)
        Deprecated.
        use JavaParser.parseName instead
        Creates a new Name from a qualified name.
        The qualified name can contains "." (dot) characters.
        Parameters:
        qualifiedName - qualified name
        Returns:
        instanceof Name
      • asString

        public String asString()
        Returns:
        the complete qualified name. Only the identifiers and the dots, so no comments or whitespace.
      • setQualifier

        public Name setQualifier​(Name qualifier)
      • remove

        public boolean remove​(Node node)
        Overrides:
        remove in class Node
      • removeQualifier

        public Name removeQualifier()
      • getMetaModel

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

        public boolean replace​(Node node,
                               Node replacementNode)
        Overrides:
        replace in class Node
      • isTopLevel

        public boolean isTopLevel()
        A top level name is a name that is not contained in a larger Name instance.
      • isInternal

        public boolean isInternal()
        An internal name is a name that constitutes a part of a larger Name instance.