Class ReflectionUtils

java.lang.Object
io.fluxcapacitor.common.reflection.ReflectionUtils

public class ReflectionUtils extends Object
Utility class for high-performance reflection-based operations across the Flux platform.

This class is intended for internal use only. It provides a wide range of methods for accessing and manipulating object members via reflection, including:

  • Resolving annotated fields and methods (with support for meta-annotations)
  • Accessing nested property paths via getters and setters (e.g., "user/address/street")
  • Efficient member access using DefaultMemberInvoker, which leverages LambdaMetafactory for near-native invocation performance
  • Generic type resolution, including collection element types and supertype inference
  • Annotation hierarchy traversal and support for Kotlin nullability reflection (if available)
  • Utilities for determining override relationships, class hierarchies, and bean property metadata
  • Robust handling of Class loading and safe access to field/method/property values

Performance Considerations

This class uses extensive caching and memoization to avoid redundant reflective operations at runtime. All public methods are safe to use in high-performance contexts such as annotation scanning, handler dispatching, and JSON schema validation.

Modular Use

If Flux adopts JPMS (Project Jigsaw) in the future, this utility would likely be placed in an internal module and not exported to consumers, to preserve encapsulation and forward compatibility.
See Also:
  • Constructor Details

    • ReflectionUtils

      public ReflectionUtils()
  • Method Details