Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/glavo/classfile
A modern Java classfile manipulation and analysis library
https://github.com/glavo/classfile
Last synced: 3 days ago
JSON representation
A modern Java classfile manipulation and analysis library
- Host: GitHub
- URL: https://github.com/glavo/classfile
- Owner: Glavo
- License: gpl-2.0
- Created: 2023-03-13T14:12:05.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-31T08:35:48.000Z (8 months ago)
- Last Synced: 2024-04-01T01:33:54.474Z (8 months ago)
- Language: Java
- Homepage:
- Size: 732 KB
- Stars: 43
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Class-File API for Java 17
[![Gradle Check](https://github.com/Glavo/classfile/actions/workflows/check.yml/badge.svg)](https://github.com/Glavo/classfile/actions/workflows/check.yml)
[![codecov](https://codecov.io/gh/Glavo/classfile/branch/main/graph/badge.svg?token=O9EUO58YKZ)](https://codecov.io/gh/Glavo/classfile)
[![Latest release](https://img.shields.io/maven-central/v/org.glavo/classfile)](https://github.com/Glavo/classfile/releases/latest)
[![javadoc](https://javadoc.io/badge2/org.glavo/classfile/javadoc.svg)](https://javadoc.io/doc/org.glavo/classfile)This is a modern Java classfile manipulation and analysis library.
This library is a modern replacement for [ASM](https://asm.ow2.io/), extracted from the latest implementation of JDK and backport to Java 17.## Adding to your build
Maven:
```xmlorg.glavo
classfile
0.5.0```
Gradle:
```kotlin
implementation("org.glavo:classfile:0.5.0")
```## Get started
* [Tutorial](https://javadoc.io/doc/org.glavo/classfile/latest/org.glavo.classfile/org/glavo/classfile/package-summary.html): The best way to learn how to use the Class-File API;
* [Javadoc](https://javadoc.io/doc/org.glavo/classfile): Documentation for the current release;
* [Examples](./src/examples/java): Some examples showing the usage of Class-File API;
* [JDK Enhancement Proposal](https://openjdk.org/jeps/466): The JEP for Class-File API.## Note
This library is extracted from OpenJDK 23 and renamed package `jdk.internal.classfile` to `org.glavo.classfile`.
Since the Class-File API is still in preview, this library may also undergo breaking changes until the Class-File API is generally available.
In order to be compatible with Java 17, this library also copies some new APIs in Java 20/21:
* `java.lang.reflect.AccessFlag` -> `org.glavo.classfile.AccessFlag`
* `java.lang.reflect.ClassFileFormatVersion` -> `org.glavo.classfile.ClassFileFormatVersion`
* `java.lang.constant.ModuleDesc` -> `org.glavo.classfile.constant.ModuleDesc`
* `java.lang.constant.PackageDesc` -> `org.glavo.classfile.constant.PackageDesc`Since the Class-File API is still in preview, it is not yet stable
[Here](CHANGELOG.md) is the change log.
If you encounter problems when using this library, please feed back through [issue](https://github.com/Glavo/classfile/issues).
If you want to discuss the design of the Class-File API, please go to the [Class-File API mailing list](https://mail.openjdk.org/mailman/listinfo/classfile-api-dev) ([email protected]) for discussion.