Class ReflectionValueResolverCollector

java.lang.Object
io.quarkus.qute.debug.agent.resolvers.ReflectionValueResolverCollector
All Implemented Interfaces:
ValueResolverCollector

public class ReflectionValueResolverCollector extends Object implements 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 Details

    • ReflectionValueResolverCollector

      public ReflectionValueResolverCollector()
  • Method Details

    • isApplicable

      public boolean isApplicable(io.quarkus.qute.ValueResolver valueResolver, io.quarkus.qute.EvalContext evalContext)
      Description copied from interface: ValueResolverCollector
      Determines if the given ValueResolver is applicable in the provided EvalContext.
      Specified by:
      isApplicable in interface ValueResolverCollector
      Parameters:
      valueResolver - the value resolver to test
      evalContext - the evaluation context for the current expression
      Returns:
      true if the resolver can be applied, false otherwise
    • collect

      public void collect(io.quarkus.qute.ValueResolver valueResolver, ValueResolverContext context)
      Collects fields and methods from the base object's class and its hierarchy.

      Only adds fields if ValueResolverContext.isCollectProperty() returns true. Only adds methods if ValueResolverContext.isCollectMethod() returns true.

      Specified by:
      collect in interface ValueResolverCollector
      Parameters:
      valueResolver - the value resolver (ignored for reflection)
      context - the context to populate with fields and methods
    • isFieldCandidate

      public static boolean isFieldCandidate(Field field)
      Checks if a field is a candidate to be collected. Excludes static fields.