java.lang.Object
io.quarkus.qute.ValueResolvers
Common value resolvers.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ValueResolverstatic ValueResolverstatic ValueResolverstatic booleanhasNoParams(EvalContext ctx) static booleanhasParams(EvalContext ctx) static ValueResolverstatic ValueResolverPerforms conditional AND on the base object and the first parameter.static ValueResolverPerforms conditional OR on the base object and the first parameter.static ValueResolverstatic ValueResolverstatic ValueResolverstatic booleanmatchClass(EvalContext ctx, Class<?> clazz) static ValueResolverstatic ValueResolverstatic ValueResolverstatic ValueResolverorEmpty()Return an empty list if the base object is null or not found.static ValueResolverReturns the default value if the base object isnull, emptyOptionalor not found and the base object otherwise.static ValueResolverstatic ValueResolverstatic ValueResolverstatic ValueResolverReturnsif the base object is falsy and the base object otherwise.invalid reference
Results#NotFound
-
Field Details
-
OR
- See Also:
-
-
Constructor Details
-
ValueResolvers
public ValueResolvers()
-
-
Method Details
-
rawResolver
-
listResolver
-
collectionResolver
-
thisResolver
-
orResolver
Returns the default value if the base object isnull, emptyOptionalor not found and the base object otherwise.foo.or(bar),foo or true,name ?: 'elvis' -
orEmpty
Return an empty list if the base object is null or not found. -
trueResolver
Returnsif the base object is falsy and the base object otherwise.invalid reference
Results#NotFoundCan be used together with
orResolver()to form a ternary operator.person.isElvis ? 'elvis' : notElvis -
mapEntryResolver
-
mapResolver
-
mapperResolver
-
logicalAndResolver
Performs conditional AND on the base object and the first parameter. It's a short-circuiting operation - the parameter is only evaluated if needed.- See Also:
-
logicalOrResolver
Performs conditional OR on the base object and the first parameter. It's a short-circuiting operation - the parameter is only evaluated if needed.- See Also:
-
arrayResolver
-
numberValueResolver
-
plusResolver
-
minusResolver
-
modResolver
-
equalsResolver
-
hasNoParams
- Parameters:
ctx-- Returns:
trueif the context has no parameters; i.e it is not a virtual method call,falseotherwise
-
hasParams
- Parameters:
ctx-- Returns:
trueif the context has at least one parameter; i.e it is a virtual method call,falseotherwise
-
matchClass
- Parameters:
ctx-clazz-- Returns:
trueif the base object from the context is assignable from the clazz,falseotherwise
-