Lightweight and fast java.beans.Introspector reimplementation used to remove dependency on java.desktop module for Bean Introspection.
The java.desktop module introduced in JDK 9 encapsulates all AWT, Swing, Image and Sound packages from Java standard libraries.
In addition to that, it contains the java.beans package with helper classes to interact with Java Beans, specifically doing introspection.
Due to its tight dependency with AWT, it cannot be easily removed from java.desktop module, causing any thirdparty library that uses java.beans package to be dependent of all java.desktop classes, adding extra 12mb of size overhead into the JVM installation and some extra memory usage.
Reimplemented java.beans.Introspector class to do analysis of Java Beans in a very lightweight and super fast way (analysis results are cached automatically) with only java.base module packages dependency.
The initial implementation is a small subset of Introspection class methods, it doesn't implement the full interface.
- Add a Maven Dependency
<dependency>
<groupId>com.github.panga</groupId>
<artifactId>java-beans-lite</artifactId>
<version>1.0.2</version>
</dependency>- Find all ocurrences of
import java.beansand replace withimport lite.beans.
- Leonardo Zanivan panga@apache.org