Package io.quarkus.qute
Interface EvalContext
-
public interface EvalContextEvaluation context of a specific part of an expression.- See Also:
Expression.Part
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompletionStage<Object>evaluate(Expression expression)Evaluate the given expression using the relevantResolutionContext.CompletionStage<Object>evaluate(String expression)Parse and evaluate the given expression using the relevantResolutionContextObjectgetAttribute(String key)ObjectgetBase()The base is always null for namespace resolvers.StringgetName()List<Expression>getParams()A virtual method may accept any number of parameters.
-
-
-
Method Detail
-
getBase
Object getBase()
The base is always null for namespace resolvers.- Returns:
- the base object or null
-
getName
String getName()
- Returns:
- the name of the virtual property/function
-
getParams
List<Expression> getParams()
A virtual method may accept any number of parameters.E.g. for a virtual method
foo(name.length,age)the list of two expressions is returned, one forname.lengthand the other one forage. It is up to the consumer to evaluate the params if needed.- Returns:
- the list of parameters, is never
null
-
evaluate
CompletionStage<Object> evaluate(String expression)
Parse and evaluate the given expression using the relevantResolutionContext- Parameters:
expression-- Returns:
- the result
-
evaluate
CompletionStage<Object> evaluate(Expression expression)
Evaluate the given expression using the relevantResolutionContext.- Parameters:
expression-- Returns:
- the result
-
getAttribute
Object getAttribute(String key)
- Parameters:
key-- Returns:
- the attribute or null
- See Also:
TemplateInstance.getAttribute(String)
-
-