Package org.sonar.python.tree
Class ParameterImpl
- java.lang.Object
-
- org.sonar.python.tree.PyTree
-
- org.sonar.python.tree.ParameterImpl
-
- All Implemented Interfaces:
AnyParameter,Parameter,Tree
public class ParameterImpl extends PyTree implements Parameter
-
-
Field Summary
-
Fields inherited from class org.sonar.python.tree.PyTree
firstToken, lastToken
-
-
Constructor Summary
Constructors Constructor Description ParameterImpl(Token starToken)constructor for star parameter syntax.ParameterImpl(Token starToken, Name name, TypeAnnotation annotation, Token equalToken, Expression defaultValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(TreeVisitor visitor)List<Tree>computeChildren()ExpressiondefaultValue()TokenequalToken()Tree.KindgetKind()Namename()TokenstarToken()Represents both '*' and '**'TypeAnnotationtypeAnnotation()-
Methods inherited from class org.sonar.python.tree.PyTree
children, firstToken, is, lastToken, parent, setParent
-
-
-
-
Constructor Detail
-
ParameterImpl
public ParameterImpl(@Nullable Token starToken, Name name, @Nullable TypeAnnotation annotation, @Nullable Token equalToken, @Nullable Expression defaultValue)
-
ParameterImpl
public ParameterImpl(Token starToken)
constructor for star parameter syntax. def fun(arg1, *, arg2)
-
-
Method Detail
-
starToken
@CheckForNull public Token starToken()
Description copied from interface:ParameterRepresents both '*' and '**'
-
name
@CheckForNull public Name name()
-
typeAnnotation
@CheckForNull public TypeAnnotation typeAnnotation()
- Specified by:
typeAnnotationin interfaceParameter
-
equalToken
@CheckForNull public Token equalToken()
- Specified by:
equalTokenin interfaceParameter
-
defaultValue
@CheckForNull public Expression defaultValue()
- Specified by:
defaultValuein interfaceParameter
-
accept
public void accept(TreeVisitor visitor)
-
-