Interface IdentifierTree
-
- All Superinterfaces:
BindingElementTree,ExpressionTree,ImportSubClauseTree,JsxElementNameTree,Tree
- All Known Implementing Classes:
IdentifierTreeImpl
@Beta public interface IdentifierTree extends ExpressionTree, BindingElementTree, ImportSubClauseTree
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SyntaxTokenidentifierToken()Stringname()Scopescope()Optional<Symbol>symbol()Optional<Usage>symbolUsage()-
Methods inherited from interface org.sonar.plugins.javascript.api.tree.declaration.BindingElementTree
bindingIdentifiers
-
Methods inherited from interface org.sonar.plugins.javascript.api.tree.expression.ExpressionTree
types
-
Methods inherited from interface org.sonar.plugins.javascript.api.tree.Tree
accept, childrenStream, descendants, firstToken, is, isAncestorOf, lastToken, parent
-
-
-
-
Method Detail
-
identifierToken
SyntaxToken identifierToken()
-
name
String name()
-
symbol
Optional<Symbol> symbol()
- Returns:
Symbolwhich is referenced by this identifier. NoSymbolis returned in several cases:- for
Tree.Kind.PROPERTY_IDENTIFIER - for unresolved symbol (i.e. symbol being read without being written)
Tree.Kind.BINDING_IDENTIFIER(used for symbol declaration) always has corresponding symbol. Note that this method is a shortcut for {@link IdentifierTree#symbolUsage()#symbol()}.- for
-
-