https://github.com/panga/java-beans-lite
Lightweight and fast java.beans.Introspector implementation
https://github.com/panga/java-beans-lite
java jdk9 jigsaw jpms
Last synced: 22 days ago
JSON representation
Lightweight and fast java.beans.Introspector implementation
- Host: GitHub
- URL: https://github.com/panga/java-beans-lite
- Owner: panga
- License: apache-2.0
- Created: 2018-06-06T20:12:39.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-07-10T02:50:37.000Z (almost 7 years ago)
- Last Synced: 2025-03-24T15:04:01.858Z (about 1 month ago)
- Topics: java, jdk9, jigsaw, jpms
- Language: Java
- Size: 37.1 KB
- Stars: 6
- Watchers: 2
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Java Beans Lite
Lightweight and fast `java.beans.Introspector` reimplementation used to remove dependency on `java.desktop` module for Bean Introspection.
## Problem
The [java.desktop](https://docs.oracle.com/javase/9/docs/api/java.desktop-summary.html) 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.
## Solution
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.
## Usage
### Using as a `java.beans` replacement
1. Add a Maven Dependency
```xml
com.github.panga
java-beans-lite
1.0.2```
2. Find all ocurrences of `import java.beans` and replace with `import lite.beans`.
## Contributors
* Leonardo Zanivan
## License
[Apache License 2.0](LICENSE)