Package org.sonar.python.tree
Class FunctionDefImpl
java.lang.Object
org.sonar.python.tree.PyTree
org.sonar.python.tree.FunctionDefImpl
- All Implemented Interfaces:
FunctionDef,FunctionLike,Statement,Tree
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.sonar.python.tree.PyTree
firstToken, lastToken -
Constructor Summary
ConstructorsConstructorDescriptionFunctionDefImpl(List<Decorator> decorators, Token asyncKeyword, Token defKeyword, Name name, TypeParams typeParams, Token leftPar, ParameterList parameters, Token rightPar, TypeAnnotation returnType, Token colon, Token newLine, Token indent, StatementList body, Token dedent, boolean isMethodDefinition, StringLiteral docstring) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(TreeVisitor visitor) voidaddLocalVariableSymbol(Symbol symbol) body()colon()getKind()booleanleftPar()name()-> returnTyperightPar()voidsetFunctionSymbol(FunctionSymbol functionSymbol) Methods inherited from class org.sonar.python.tree.PyTree
children, firstToken, is, lastToken, parent, setParent
-
Constructor Details
-
FunctionDefImpl
public FunctionDefImpl(List<Decorator> decorators, @Nullable Token asyncKeyword, Token defKeyword, Name name, TypeParams typeParams, Token leftPar, @Nullable ParameterList parameters, Token rightPar, @Nullable TypeAnnotation returnType, Token colon, @Nullable Token newLine, @Nullable Token indent, StatementList body, @Nullable Token dedent, boolean isMethodDefinition, @Nullable StringLiteral docstring)
-
-
Method Details
-
decorators
- Specified by:
decoratorsin interfaceFunctionDef
-
defKeyword
- Specified by:
defKeywordin interfaceFunctionDef
-
asyncKeyword
- Specified by:
asyncKeywordin interfaceFunctionDef
-
name
- Specified by:
namein interfaceFunctionDef
-
typeParams
- Specified by:
typeParamsin interfaceFunctionDef
-
leftPar
- Specified by:
leftParin interfaceFunctionDef
-
parameters
- Specified by:
parametersin interfaceFunctionLike
-
rightPar
- Specified by:
rightParin interfaceFunctionDef
-
returnTypeAnnotation
Description copied from interface:FunctionDef-> returnType- Specified by:
returnTypeAnnotationin interfaceFunctionDef
-
colon
- Specified by:
colonin interfaceFunctionDef
-
body
- Specified by:
bodyin interfaceFunctionDef
-
isMethodDefinition
public boolean isMethodDefinition()- Specified by:
isMethodDefinitionin interfaceFunctionLike
-
docstring
- Specified by:
docstringin interfaceFunctionDef
-
localVariables
- Specified by:
localVariablesin interfaceFunctionLike- Returns:
- symbols of local variables and parameters
-
addLocalVariableSymbol
-
getKind
-
accept
-
computeChildren
-
setFunctionSymbol
-
functionSymbol
-