A fluent API for Java reflection that simplifies accessing and manipulating class structures at runtime.
jOOR is a Java library that provides a fluent API for reflection, making it easier to access and manipulate class structures at runtime. It wraps the standard java.lang.reflect package to reduce verbosity and simplify common reflection tasks like method invocation, constructor calls, and proxy creation. The library addresses the complexity of JDK reflection by offering intuitive, chainable methods.
Java developers who need to work with reflection for frameworks, libraries, or applications requiring runtime class manipulation, dynamic code generation, or simplified proxy creation.
Developers choose jOOR because it dramatically reduces reflection boilerplate with a clean, fluent interface, automatically handles exception wrapping, and provides additional utilities like runtime compilation. It's a lightweight, dependency-free alternative to more complex reflection libraries.
jOOR - Fluent Reflection in Java jOOR is a very simple fluent API that gives access to your Java Class structures in a more intuitive way. The JDK's reflection APIs are hard and verbose to use. Other languages have much simpler constructs to access type meta information at runtime. Let us make Java reflection better.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Offers chainable methods like onClass().create().call() that make reflection code readable and concise, as shown in the comparison with verbose standard reflection examples.
Wraps checked exceptions in runtime exceptions, eliminating try-catch boilerplate for common reflective operations, mentioned in the README's exception handling feature.
Enables easy creation of dynamic proxies through interface definitions, abstracting away the complexity of java.lang.reflect.Proxy, illustrated in the proxy abstraction example.
Provides a streamlined API for compiling Java code at runtime using javax.tools.JavaCompiler, with clear examples for dynamic class generation and instantiation.
Inherits the performance penalties of Java reflection, such as slower method invocation and lack of compile-time optimizations, which can impact high-throughput applications.
Focused solely on reflection; lacks capabilities for bytecode engineering or advanced aspect-oriented programming found in libraries like ByteBuddy or CGLIB.
Runtime compilation requires the optional java.compiler module, which may not be present in all Java runtimes, adding deployment and setup complexity for that feature.