Class ArrowFunctionTreeImpl
- java.lang.Object
-
- org.sonar.javascript.tree.impl.JavaScriptTree
-
- org.sonar.javascript.tree.impl.declaration.FunctionTreeImpl
-
- org.sonar.javascript.tree.impl.expression.ArrowFunctionTreeImpl
-
- All Implemented Interfaces:
TypableTree,FunctionTree,ArrowFunctionTree,ExpressionTree,JsxElementNameTree,Tree
public class ArrowFunctionTreeImpl extends FunctionTreeImpl implements ArrowFunctionTree, TypableTree
-
-
Constructor Summary
Constructors Constructor Description ArrowFunctionTreeImpl(SyntaxToken asyncToken, FlowGenericParameterClauseTree genericParameterClause, Tree parameters, FlowTypeAnnotationTree returnType, InternalSyntaxToken doubleArrow, Tree body)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(DoubleDispatchVisitor visitor)voidadd(Type type)SyntaxTokenasyncToken()Treebody()EitherBlockTreeorExpressionTreeIterator<Tree>childrenIterator()Creates iterator for children of this node.SyntaxTokendoubleArrowToken()FlowGenericParameterClauseTreegenericParameterClause()Tree.KindgetKind()Treename()TreeparameterClause()List<IdentifierTree>parameterIdentifiers()List<BindingElementTree>parameterList()FlowTypeAnnotationTreereturnType()TypeSettypes()Returns an unmodifiable set of the possible types for the expression.-
Methods inherited from class org.sonar.javascript.tree.impl.declaration.FunctionTreeImpl
outerScopeSymbolUsages, scope, scope
-
Methods inherited from class org.sonar.javascript.tree.impl.JavaScriptTree
childrenStream, descendants, firstToken, is, isAncestorOf, isLeaf, lastToken, parent, setParent, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.sonar.plugins.javascript.api.tree.declaration.FunctionTree
scope
-
Methods inherited from interface org.sonar.plugins.javascript.api.tree.Tree
childrenStream, descendants, firstToken, is, isAncestorOf, lastToken, parent
-
-
-
-
Constructor Detail
-
ArrowFunctionTreeImpl
public ArrowFunctionTreeImpl(@Nullable SyntaxToken asyncToken, FlowGenericParameterClauseTree genericParameterClause, Tree parameters, @Nullable FlowTypeAnnotationTree returnType, InternalSyntaxToken doubleArrow, Tree body)
-
-
Method Detail
-
asyncToken
@Nullable public SyntaxToken asyncToken()
- Specified by:
asyncTokenin interfaceFunctionTree
-
name
@Nullable public Tree name()
- Specified by:
namein interfaceFunctionTree
-
genericParameterClause
@Nullable public FlowGenericParameterClauseTree genericParameterClause()
- Specified by:
genericParameterClausein interfaceFunctionTree
-
parameterClause
public Tree parameterClause()
Description copied from interface:ArrowFunctionTree- Specified by:
parameterClausein interfaceArrowFunctionTree- Specified by:
parameterClausein interfaceFunctionTree
-
returnType
@Nullable public FlowTypeAnnotationTree returnType()
- Specified by:
returnTypein interfaceArrowFunctionTree- Specified by:
returnTypein interfaceFunctionTree
-
doubleArrowToken
public SyntaxToken doubleArrowToken()
- Specified by:
doubleArrowTokenin interfaceArrowFunctionTree
-
body
public Tree body()
Description copied from interface:ArrowFunctionTreeEitherBlockTreeorExpressionTree- Specified by:
bodyin interfaceArrowFunctionTree- Specified by:
bodyin interfaceFunctionTree
-
parameterList
public List<BindingElementTree> parameterList()
- Specified by:
parameterListin interfaceFunctionTree
-
getKind
public Tree.Kind getKind()
- Specified by:
getKindin classJavaScriptTree
-
childrenIterator
public Iterator<Tree> childrenIterator()
Description copied from class:JavaScriptTreeCreates iterator for children of this node. Note that iterator may containnullelements.- Specified by:
childrenIteratorin classJavaScriptTree
-
accept
public void accept(DoubleDispatchVisitor visitor)
-
parameterIdentifiers
public List<IdentifierTree> parameterIdentifiers()
-
types
public TypeSet types()
Description copied from interface:ExpressionTreeReturns an unmodifiable set of the possible types for the expression. Attempts to modify the returned set, whether direct or via its iterator, will result in an UnsupportedOperationException.- Specified by:
typesin interfaceExpressionTree
-
add
public void add(Type type)
- Specified by:
addin interfaceTypableTree
-
-