Interface FunctionSymbol
-
- All Superinterfaces:
Symbol
- All Known Implementing Classes:
FunctionSymbolImpl
public interface FunctionSymbol extends Symbol
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceFunctionSymbol.Parameter-
Nested classes/interfaces inherited from interface org.sonar.plugins.python.api.symbols.Symbol
Symbol.Kind
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringannotatedReturnTypeName()Returns fully qualified name of the return type if anyList<String>decorators()Returns the known names of the decorators.LocationInFiledefinitionLocation()booleanhasDecorators()booleanhasVariadicParameter()booleanisAsynchronous()booleanisInstanceMethod()booleanisStub()When true, it denotes a function symbol for a function stub.List<FunctionSymbol.Parameter>parameters()-
Methods inherited from interface org.sonar.plugins.python.api.symbols.Symbol
annotatedTypeName, fullyQualifiedName, is, kind, name, usages
-
-
-
-
Method Detail
-
parameters
List<FunctionSymbol.Parameter> parameters()
-
isStub
boolean isStub()
When true, it denotes a function symbol for a function stub.def fn(p1, p2): ...
-
isAsynchronous
boolean isAsynchronous()
-
hasVariadicParameter
boolean hasVariadicParameter()
-
isInstanceMethod
boolean isInstanceMethod()
-
decorators
List<String> decorators()
Returns the known names of the decorators. It might not be a reliable way to infer the number of decorators as they can take more complex expressions since Python 3.9
-
hasDecorators
boolean hasDecorators()
-
definitionLocation
@CheckForNull LocationInFile definitionLocation()
-
annotatedReturnTypeName
@Beta @CheckForNull String annotatedReturnTypeName()
Returns fully qualified name of the return type if any
-
-