public class Name extends Node implements NodeWithIdentifier<Name>
The rightmost identifier is "identifier", The one to the left of it is "qualifier.identifier", etc.
You can construct one from a String with the name(...) method.
SimpleNameNode.BreadthFirstIterator, Node.DirectChildrenIterator, Node.ObserverRegistrationMode, Node.ParentsVisitor, Node.Parsedness, Node.PostOrderIterator, Node.PreOrderIterator, Node.TreeTraversalABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, LINE_SEPARATOR_KEY, NODE_BY_BEGIN_POSITION, PHANTOM_KEY, prettyPrinterNoCommentsConfiguration, PRINTER_KEY, SYMBOL_RESOLVER_KEY| Constructor and Description |
|---|
Name() |
Name(Name qualifier,
String identifier) |
Name(String identifier) |
Name(TokenRange tokenRange,
Name qualifier,
String identifier)
This constructor is used by the parser and is considered private.
|
| Modifier and Type | Method and Description |
|---|---|
<R,A> R |
accept(GenericVisitor<R,A> v,
A arg)
Accept method for visitor support.
|
<A> void |
accept(VoidVisitor<A> v,
A arg)
Accept method for visitor support.
|
String |
asString() |
Name |
clone() |
String |
getIdentifier() |
NameMetaModel |
getMetaModel() |
Optional<Name> |
getQualifier() |
boolean |
hasQualifier() |
boolean |
isInternal()
An internal name is a name that constitutes a part of a larger Name instance.
|
boolean |
isTopLevel()
A top level name is a name that is not contained in a larger Name instance.
|
boolean |
remove(Node node) |
Name |
removeQualifier() |
boolean |
replace(Node node,
Node replacementNode) |
Name |
setIdentifier(String identifier) |
Name |
setQualifier(Name qualifier) |
addOrphanComment, containsData, createDefaultPrinter, createDefaultPrinter, customInitialization, equals, findAll, findAll, findAll, findByRange, findCompilationUnit, findData, findFirst, findFirst, findFirst, findRootNode, getAllContainedComments, getChildNodes, getChildNodesByType, getComment, getData, getDataKeys, getDefaultPrinterConfiguration, getLineEndingStyle, getLineEndingStyleOrDefault, getNodesByType, getOrphanComments, getParentNode, getParentNodeForChildren, getParsed, getPrinter, getPrinter, getRange, getSymbolResolver, getTokenRange, hashCode, hasScope, isAncestorOf, isPhantom, isRegistered, notifyPropertyChange, register, register, registerForSubtree, remove, removeComment, removeData, removeForced, removeOrphanComment, replace, setAsParentNodeOf, setAsParentNodeOf, setBlockComment, setComment, setData, setLineComment, setParentNode, setParsed, setRange, setTokenRange, stream, stream, toString, toString, tryAddImportToParentCompilationUnit, unregister, walk, walk, walkfinalize, getClass, notify, notifyAll, wait, wait, waitgetId, setIdfindAncestor, findAncestor, findAncestor, hasParentNode, isDescendantOfcontainsWithin, containsWithinRange, getBegin, getEnd, hasRangepublic Name()
public Name(String identifier)
public Name(TokenRange tokenRange, Name qualifier, String identifier)
public <R,A> R accept(GenericVisitor<R,A> v, A arg)
Visitableaccept in interface VisitableR - the type of the return value of the visitorA - the type the user argument passed to the visitorv - the visitor implementationarg - the argument passed to the visitor (of type A)public <A> void accept(VoidVisitor<A> v, A arg)
Visitablepublic String getIdentifier()
getIdentifier in interface NodeWithIdentifier<Name>public Name setIdentifier(String identifier)
setIdentifier in interface NodeWithIdentifier<Name>public String asString()
public boolean hasQualifier()
public Name removeQualifier()
public NameMetaModel getMetaModel()
getMetaModel in class Nodepublic boolean isTopLevel()
public boolean isInternal()
Copyright © 2007–2025. All rights reserved.