public class IdentifierTreeImpl extends JavaScriptTree implements IdentifierTree, TypableTree
| Constructor and Description |
|---|
IdentifierTreeImpl(Tree.Kind kind,
InternalSyntaxToken nameToken) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(DoubleDispatchVisitor visitor) |
void |
add(Type type) |
List<IdentifierTree> |
bindingIdentifiers() |
Iterator<Tree> |
childrenIterator()
Creates iterator for children of this node.
|
Tree.Kind |
getKind() |
SyntaxToken |
identifierToken() |
String |
name() |
Scope |
scope() |
void |
scope(Scope scope) |
void |
setSymbolUsage(Usage usage) |
Optional<Symbol> |
symbol() |
Optional<Usage> |
symbolUsage() |
String |
toString() |
TypeSet |
types()
Returns an unmodifiable set of the possible types for the expression.
|
childrenStream, descendants, firstToken, is, isAncestorOf, isLeaf, lastToken, parent, setParentclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitchildrenStream, descendants, firstToken, is, isAncestorOf, lastToken, parentpublic IdentifierTreeImpl(Tree.Kind kind, InternalSyntaxToken nameToken)
public Tree.Kind getKind()
getKind in class JavaScriptTreepublic SyntaxToken identifierToken()
identifierToken in interface IdentifierTreepublic String name()
name in interface IdentifierTreepublic String toString()
toString in class JavaScriptTreepublic Optional<Usage> symbolUsage()
symbolUsage in interface IdentifierTreeUsage corresponding to this identifier. Empty optional is returned when there is no symbol available for this identifier (see IdentifierTree.symbol())public final Optional<Symbol> symbol()
symbol in interface IdentifierTreeSymbol which is referenced by this identifier. No Symbol is returned in several cases:
Kind#PROPERTY_IDENTIFIERKind#BINDING_IDENTIFIER (used for symbol declaration) always has corresponding symbol.
Note that this method is a shortcut for IdentifierTree#symbolUsage()#symbol().public void setSymbolUsage(Usage usage)
public TypeSet types()
ExpressionTreetypes in interface ExpressionTreepublic void add(Type type)
add in interface TypableTreepublic Iterator<Tree> childrenIterator()
JavaScriptTreenull elements.childrenIterator in class JavaScriptTreepublic void accept(DoubleDispatchVisitor visitor)
public Scope scope()
scope in interface IdentifierTreeScope instance in which this identifier appearpublic void scope(Scope scope)
public List<IdentifierTree> bindingIdentifiers()
bindingIdentifiers in interface BindingElementTreeCopyright © 2011–2017 SonarSource and Eriks Nukis. All rights reserved.