Package org.sonar.python.tree
Class PyFunctionDefTreeImpl
- java.lang.Object
-
- org.sonar.python.tree.PyTree
-
- org.sonar.python.tree.PyFunctionDefTreeImpl
-
- All Implemented Interfaces:
PyFunctionDefTree,PyStatementTree,Tree
public class PyFunctionDefTreeImpl extends PyTree implements PyFunctionDefTree
-
-
Constructor Summary
Constructors Constructor Description PyFunctionDefTreeImpl(com.sonar.sslr.api.AstNode astNode, List<PyDecoratorTree> decorators, com.sonar.sslr.api.Token asyncKeyword, com.sonar.sslr.api.Token defKeyword, PyNameTree name, com.sonar.sslr.api.Token leftPar, PyParameterListTree parameters, com.sonar.sslr.api.Token rightPar, PyTypeAnnotationTree returnType, com.sonar.sslr.api.Token colon, PyStatementListTree body, boolean isMethodDefinition, com.sonar.sslr.api.Token docstring)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(PyTreeVisitor visitor)com.sonar.sslr.api.TokenasyncKeyword()PyStatementListTreebody()List<Tree>children()com.sonar.sslr.api.Tokencolon()List<PyDecoratorTree>decorators()com.sonar.sslr.api.TokendefKeyword()com.sonar.sslr.api.Tokendocstring()Tree.KindgetKind()booleanisMethodDefinition()com.sonar.sslr.api.TokenleftPar()PyNameTreename()PyParameterListTreeparameters()PyTypeAnnotationTreereturnTypeAnnotation()-> returnTypecom.sonar.sslr.api.TokenrightPar()-
Methods inherited from class org.sonar.python.tree.PyTree
astNode, firstToken, is, lastToken, parent, setParent
-
-
-
-
Constructor Detail
-
PyFunctionDefTreeImpl
public PyFunctionDefTreeImpl(com.sonar.sslr.api.AstNode astNode, List<PyDecoratorTree> decorators, @Nullable com.sonar.sslr.api.Token asyncKeyword, com.sonar.sslr.api.Token defKeyword, PyNameTree name, com.sonar.sslr.api.Token leftPar, @Nullable PyParameterListTree parameters, com.sonar.sslr.api.Token rightPar, @Nullable PyTypeAnnotationTree returnType, com.sonar.sslr.api.Token colon, PyStatementListTree body, boolean isMethodDefinition, @Nullable com.sonar.sslr.api.Token docstring)
-
-
Method Detail
-
decorators
public List<PyDecoratorTree> decorators()
- Specified by:
decoratorsin interfacePyFunctionDefTree
-
defKeyword
public com.sonar.sslr.api.Token defKeyword()
- Specified by:
defKeywordin interfacePyFunctionDefTree
-
asyncKeyword
@CheckForNull public com.sonar.sslr.api.Token asyncKeyword()
- Specified by:
asyncKeywordin interfacePyFunctionDefTree
-
name
public PyNameTree name()
- Specified by:
namein interfacePyFunctionDefTree
-
leftPar
public com.sonar.sslr.api.Token leftPar()
- Specified by:
leftParin interfacePyFunctionDefTree
-
parameters
@CheckForNull public PyParameterListTree parameters()
- Specified by:
parametersin interfacePyFunctionDefTree
-
rightPar
public com.sonar.sslr.api.Token rightPar()
- Specified by:
rightParin interfacePyFunctionDefTree
-
returnTypeAnnotation
@CheckForNull public PyTypeAnnotationTree returnTypeAnnotation()
Description copied from interface:PyFunctionDefTree-> returnType- Specified by:
returnTypeAnnotationin interfacePyFunctionDefTree
-
colon
public com.sonar.sslr.api.Token colon()
- Specified by:
colonin interfacePyFunctionDefTree
-
body
public PyStatementListTree body()
- Specified by:
bodyin interfacePyFunctionDefTree
-
isMethodDefinition
public boolean isMethodDefinition()
- Specified by:
isMethodDefinitionin interfacePyFunctionDefTree
-
docstring
@CheckForNull public com.sonar.sslr.api.Token docstring()
- Specified by:
docstringin interfacePyFunctionDefTree
-
accept
public void accept(PyTreeVisitor visitor)
-
-