Class StringLiteral
- java.lang.Object
-
- software.amazon.smithy.rulesengine.language.syntax.SyntaxElement
-
- software.amazon.smithy.rulesengine.language.syntax.expressions.Expression
-
- software.amazon.smithy.rulesengine.language.syntax.expressions.literal.Literal
-
- software.amazon.smithy.rulesengine.language.syntax.expressions.literal.StringLiteral
-
- All Implemented Interfaces:
FromSourceLocation
,ToNode
,TypeCheck
,ToCondition
,ToExpression
public final class StringLiteral extends Literal
A string literal value, containing a template.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
accept(LiteralVisitor<T> visitor)
java.util.Optional<Template>
asStringLiteral()
boolean
equals(java.lang.Object obj)
int
hashCode()
Node
toNode()
Converts a value to aNode
.java.lang.String
toString()
Template
value()
Gets the template for this literal value.-
Methods inherited from class software.amazon.smithy.rulesengine.language.syntax.expressions.literal.Literal
accept, asBooleanLiteral, asIntegerLiteral, asRecordLiteral, asTupleLiteral, booleanLiteral, evaluate, fromNode, integerLiteral, recordLiteral, stringLiteral, tupleLiteral, typeCheckLocal
-
Methods inherited from class software.amazon.smithy.rulesengine.language.syntax.expressions.Expression
getLiteral, getReference, getSourceLocation, of, of, of, parseShortform, toConditionBuilder, toExpression, type, typeCheck
-
Methods inherited from class software.amazon.smithy.rulesengine.language.syntax.SyntaxElement
booleanEqual, getAttr, getAttr, isSet, isValidHostLabel, not, parseUrl, stringEqual, substring, template
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.smithy.rulesengine.language.syntax.ToCondition
toCondition, toCondition
-
-
-
-
Method Detail
-
value
public Template value()
Gets the template for this literal value.- Returns:
- the literal's value template.
-
accept
public <T> T accept(LiteralVisitor<T> visitor)
-
asStringLiteral
public java.util.Optional<Template> asStringLiteral()
- Overrides:
asStringLiteral
in classLiteral
-
hashCode
public int hashCode()
- Specified by:
hashCode
in classExpression
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in classExpression
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-