java.lang.Object
io.quarkus.qute.ReflectionValueResolver
- All Implemented Interfaces:
Resolver,ValueResolver,WithPriority
This value resolver can be used to access public members of classes via reflection.
-
Field Summary
FieldsFields inherited from interface io.quarkus.qute.WithPriority
DEFAULT_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanappliesTo(EvalContext context) voidgetCachedResolver(EvalContext context) WhenValueResolver.appliesTo(EvalContext)returnstruefor a specificEvalContextand the subsequent invocation ofResolver.resolve(EvalContext)does not returnthe value resolver returned from this method is cached for the specific part of an expression.invalid reference
Results#NotFoundintValue resolvers with higher priority take precedence.resolve(EvalContext context) This method should return an instance ofif it's not possible to resolve the context.invalid reference
Results#NotFoundMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.quarkus.qute.ValueResolver
getSupportedMethods, getSupportedProperties
-
Field Details
-
GET_PREFIX
- See Also:
-
IS_PREFIX
- See Also:
-
HAS_PREFIX
- See Also:
-
-
Constructor Details
-
ReflectionValueResolver
public ReflectionValueResolver()
-
-
Method Details
-
getPriority
public int getPriority()Description copied from interface:ValueResolverValue resolvers with higher priority take precedence.- Specified by:
getPriorityin interfaceValueResolver- Specified by:
getPriorityin interfaceWithPriority- Returns:
- the priority value
-
appliesTo
- Specified by:
appliesToin interfaceValueResolver- Parameters:
context-- Returns:
trueif this resolver applies to the given context
-
resolve
Description copied from interface:ResolverThis method should return an instance ofif it's not possible to resolve the context. Any other value is considered a valid result, includinginvalid reference
Results#NotFoundnull. -
getCachedResolver
Description copied from interface:ValueResolverWhenValueResolver.appliesTo(EvalContext)returnstruefor a specificEvalContextand the subsequent invocation ofResolver.resolve(EvalContext)does not returnthe value resolver returned from this method is cached for the specific part of an expression.invalid reference
Results#NotFoundBy default, the resolver itself is cached. However, it is also possible to return an optimized version.
- Specified by:
getCachedResolverin interfaceValueResolver- Parameters:
context-- Returns:
- the resolver that should be cached
-
clearCache
public void clearCache()
-