Package io.quarkus.qute
Interface Expression
-
public interface ExpressionRepresents a value expression. It could be a literal such as'foo'. It could have a namespace such asdatafordata:name. It could have several parts such asitemandnameforitem.name.- See Also:
Evaluator
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceExpression.Partstatic interfaceExpression.VirtualMethodPartPart that represents a virtual method.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description CompletionStage<Object>asLiteral()default StringcollectTypeInfo()intgetGeneratedId()The id must be unique for the template.ObjectgetLiteral()CompletableFuture<Object>getLiteralValue()StringgetNamespace()TemplateNode.OrigingetOrigin()List<Expression.Part>getParts()default booleanhasNamespace()default booleanhasTypeInfo()booleanisLiteral()StringtoOriginalString()
-
-
-
Method Detail
-
getNamespace
String getNamespace()
- Returns:
- the namespace, may be
null - See Also:
NamespaceResolver
-
hasNamespace
default boolean hasNamespace()
-
getParts
List<Expression.Part> getParts()
- Returns:
- the list of parts, is never
null
-
isLiteral
boolean isLiteral()
- Returns:
- true if it represents a literal
-
getLiteralValue
CompletableFuture<Object> getLiteralValue()
- Returns:
- the literal value, or null
-
getLiteral
Object getLiteral()
- Returns:
- the literal value, or null
-
asLiteral
CompletionStage<Object> asLiteral()
- Returns:
- the literal value
- Throws:
IllegalStateException- If the expression does not represent a literal- See Also:
isLiteral()
-
getOrigin
TemplateNode.Origin getOrigin()
- Returns:
- the origin
-
toOriginalString
String toOriginalString()
- Returns:
- the original value as defined in the template
-
collectTypeInfo
default String collectTypeInfo()
-
hasTypeInfo
default boolean hasTypeInfo()
-
getGeneratedId
int getGeneratedId()
The id must be unique for the template.- Returns:
- the generated id or
-1for an expression that was not created by a parser
-
-