Package io.quarkus.qute
Interface Expression
public interface Expression
Represents a value expression. It could be a literal such as
'foo'. It could have a namespace such as data
for data:name. It could have several parts such as item and name for item.name.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfacestatic interfacePart that represents a virtual method. -
Method Summary
-
Method Details
-
getNamespace
String getNamespace()- Returns:
- the namespace, may be
null - See Also:
-
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:
-
getOrigin
TemplateNode.Origin getOrigin()- Returns:
- the origin
-
toOriginalString
String toOriginalString()- Returns:
- the original value as defined in the template
-
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
-