The microBean™ Construct project provides classes and interfaces assisting with Java constructs such as types and elements.
Among other things, this project enables constructs modeled by the javax.lang.model.* packages to be accessed at
runtime in a thread-safe manner. This permits the same constructs to be used at build time (e.g. by annotation
processors) and at runtime (e.g. by tools and environments that need to perform reflection-like activities without
actually loading and initializing classes), using only official and sanctioned APIs.
This project is currently experimental, in a pre-alpha state, and unsuitable for production use.
Until further notice, this project's APIs are subject to frequent backwards-incompatible signature and behavior changes, regardless of project version and without notice.
microBean™ Construct requires a Java runtime of version 21 or higher.
microBean™ Construct is available on Maven Central. Include microBean™ Construct as a Maven dependency:
<dependency>
<groupId>org.microbean</groupId>
<artifactId>microbean-construct</artifactId>
<!--
Always check https://search.maven.org/artifact/org.microbean/microbean-construct
for up-to-date available versions.
-->
<version>0.0.19</version>
</dependency>Full documentation is available at microbean.github.io/microbean-construct.
- This project is tangentially and purely coincidentally related to JEP 119.
- A seemingly shelved attempt to implement the
javax.lang.model.*constructs in terms of reflective constructs can be found in JDK-8004133.