Module io.quarkus.qute.debug
Class ReflectionValueResolverCollector
java.lang.Object
io.quarkus.qute.debug.agent.resolvers.ReflectionValueResolverCollector
- All Implemented Interfaces:
ValueResolverCollector
Reflection-based collector for value resolvers.
This collector inspects the base object's class using reflection and adds
public, non-static fields and methods to the ValueResolverContext.
It is analogous to ValueResolver.getSupportedProperties() and
ValueResolver.getSupportedMethods() but uses reflection instead.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcollect(io.quarkus.qute.ValueResolver valueResolver, ValueResolverContext context) Collects fields and methods from the base object's class and its hierarchy.booleanisApplicable(io.quarkus.qute.ValueResolver valueResolver, io.quarkus.qute.EvalContext evalContext) Determines if the givenValueResolveris applicable in the providedEvalContext.static booleanisFieldCandidate(Field field) Checks if a field is a candidate to be collected.
-
Constructor Details
-
ReflectionValueResolverCollector
public ReflectionValueResolverCollector()
-
-
Method Details
-
isApplicable
public boolean isApplicable(io.quarkus.qute.ValueResolver valueResolver, io.quarkus.qute.EvalContext evalContext) Description copied from interface:ValueResolverCollectorDetermines if the givenValueResolveris applicable in the providedEvalContext.- Specified by:
isApplicablein interfaceValueResolverCollector- Parameters:
valueResolver- the value resolver to testevalContext- the evaluation context for the current expression- Returns:
trueif the resolver can be applied,falseotherwise
-
collect
Collects fields and methods from the base object's class and its hierarchy.Only adds fields if
ValueResolverContext.isCollectProperty()returns true. Only adds methods ifValueResolverContext.isCollectMethod()returns true.- Specified by:
collectin interfaceValueResolverCollector- Parameters:
valueResolver- the value resolver (ignored for reflection)context- the context to populate with fields and methods
-
isFieldCandidate
Checks if a field is a candidate to be collected. Excludes static fields.
-