Bridge is a post-compile maven plugin that injects new advanced functionality into the Java language using existing semantics. Currently, we add the following features:
- Redirection of constructors, methods, & fields with
@Bridge
- Unsafe native referencing of classes, constructors, methods, & fields with
Invocation
- Unrestricted
goto
execution jumping withLabel
&Jump
- Automatic multi-release class forking with
Invocation.LANGUAGE_LEVEL
- Native unchecked casting, throwing, & handling with
Unchecked
- Post-compile class hierarchy modification with
@Adopt
- Public implementation hiding with
@Synthetic
- Optional stripping of debug metadata
This project can always benefit from your submission of additional automated testing!
<!-- required to access the api -->
<repositories>
<repository>
<id>ME1312.net</id>
<url>https://dev.me1312.net/maven</url>
</repository>
</repositories>
<!-- required to access the maven plugin -->
<pluginRepositories>
<pluginRepository>
<id>ME1312.net</id>
<url>https://dev.me1312.net/maven</url>
</pluginRepository>
</pluginRepositories>
<!-- ensures the api and maven plugin use the same version -->
<properties> <!-- don't forget to replace this value with a real build id! -->
<bridge.version>00w00a</bridge.version>
</properties>
<!-- provides you an api to compile against that isn't required at runtime -->
<dependencies>
<dependency>
<groupId>net.ME1312.ASM</groupId>
<artifactId>bridge</artifactId>
<version>${bridge.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
<!-- runs a maven plugin to build your bridges -->
<build>
<plugins>
<plugin>
<groupId>net.ME1312.ASM</groupId>
<artifactId>bridge-plugin</artifactId>
<version>${bridge.version}</version>
<executions>
<execution>
<goals>
<goal>bridge</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>