Package org.sonar.python.tree
Class StringElementImpl
java.lang.Object
org.sonar.python.tree.PyTree
org.sonar.python.tree.StringElementImpl
- All Implemented Interfaces:
StringElement,Tree
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.sonar.python.tree.PyTree
firstToken, lastToken -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(TreeVisitor visitor) intgetKind()booleanbooleanprefix()value()
-
Constructor Details
-
StringElementImpl
-
-
Method Details
-
firstToken
- Specified by:
firstTokenin interfaceTree- Overrides:
firstTokenin classPyTree
-
lastToken
-
getKind
-
accept
-
computeChildren
-
value
- Specified by:
valuein interfaceStringElement- Returns:
- the token value of this literal.
-
trimmedQuotesValue
- Specified by:
trimmedQuotesValuein interfaceStringElement
-
prefix
- Specified by:
prefixin interfaceStringElement
-
isTripleQuoted
public boolean isTripleQuoted()- Specified by:
isTripleQuotedin interfaceStringElement
-
isInterpolated
public boolean isInterpolated()- Specified by:
isInterpolatedin interfaceStringElement
-
formattedExpressions
- Specified by:
formattedExpressionsin interfaceStringElement- Returns:
- Formatted expressions of an f-string. Empty list if the string element is not an f-string.
-
contentStartIndex
public int contentStartIndex()
-