Package org.sonar.python.tree
Class DecoratorImpl
- java.lang.Object
-
- org.sonar.python.tree.PyTree
-
- org.sonar.python.tree.SimpleStatement
-
- org.sonar.python.tree.DecoratorImpl
-
public class DecoratorImpl extends SimpleStatement implements Decorator
Even if decorator is not a statement, it extendsSimpleStatementin order to properly resolve its last token as it's a newline token
-
-
Field Summary
-
Fields inherited from class org.sonar.python.tree.PyTree
firstToken, lastToken
-
-
Constructor Summary
Constructors Constructor Description DecoratorImpl(Token atToken, Expression expression, Token newLineToken)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaccept(TreeVisitor visitor)ArgListarguments()TokenatToken()List<Tree>computeChildren()Expressionexpression()Tree.KindgetKind()TokenleftPar()Deprecated.DottedNamename()Deprecated.TokenrightPar()Deprecated.-
Methods inherited from class org.sonar.python.tree.SimpleStatement
lastToken
-
Methods inherited from class org.sonar.python.tree.PyTree
children, firstToken, is, parent, setParent
-
-
-
-
Constructor Detail
-
DecoratorImpl
public DecoratorImpl(Token atToken, Expression expression, @Nullable Token newLineToken)
-
-
Method Detail
-
name
@Deprecated public DottedName name()
Deprecated.Description copied from interface:DecoratorMight return a DottedName containing an empty list of names when the expression is more complex than a qualified name or a call expression (possible since Python 3.9)
-
leftPar
@CheckForNull @Deprecated public Token leftPar()
Deprecated.
-
arguments
@CheckForNull public ArgList arguments()
-
rightPar
@CheckForNull @Deprecated public Token rightPar()
Deprecated.
-
expression
public Expression expression()
- Specified by:
expressionin interfaceDecorator
-
accept
public void accept(TreeVisitor visitor)
-
-