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.
SimpleName
Node.BreadthFirstIterator, Node.DirectChildrenIterator, Node.ObserverRegistrationMode, Node.ParentsVisitor, Node.Parsedness, Node.PostOrderIterator, Node.PreOrderIterator, Node.TreeTraversal
ABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, NODE_BY_BEGIN_POSITION, prettyPrinterNoCommentsConfiguration, 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 |
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, customInitialization, equals, findAll, findAll, findCompilationUnit, findFirst, findFirst, findFirst, findRootNode, getAllContainedComments, getChildNodes, getChildNodesByType, getComment, getData, getDataKeys, getNodesByType, getOrphanComments, getParentNode, getParentNodeForChildren, getParsed, getRange, getSymbolResolver, getTokenRange, getToStringPrettyPrinterConfiguration, hashCode, isAncestorOf, isRegistered, notifyPropertyChange, register, register, registerForSubtree, remove, removeComment, removeData, removeForced, removeOrphanComment, replace, setAsParentNodeOf, setAsParentNodeOf, setBlockComment, setComment, setData, setLineComment, setParentNode, setParsed, setRange, setTokenRange, setToStringPrettyPrinterConfiguration, stream, stream, toString, toString, tryAddImportToParentCompilationUnit, unregister, walk, walk, walk
finalize, getClass, notify, notifyAll, wait, wait, wait
getId, setId
findAncestor, findAncestor, isDescendantOf
containsWithin, containsWithinRange, getBegin, getEnd
public Name()
public Name(String identifier)
public Name(TokenRange tokenRange, Name qualifier, String identifier)
public <R,A> R accept(GenericVisitor<R,A> v, A arg)
Visitable
accept
in interface Visitable
R
- 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)
Visitable
public String getIdentifier()
getIdentifier
in interface NodeWithIdentifier<Name>
public Name setIdentifier(String identifier)
setIdentifier
in interface NodeWithIdentifier<Name>
public String asString()
public Name removeQualifier()
public NameMetaModel getMetaModel()
getMetaModel
in class Node
public boolean isTopLevel()
public boolean isInternal()
Copyright © 2007–2020. All rights reserved.