Skip to content

isabella232/proxy-processor

 
 

Repository files navigation

proxy-processor

Annotation processor which provides typed proxy factories that are compatible with closed-world environments. This means proxy instances created using code generated by this library can be used in GraalVM native images due to automatic detection.

Usage

import java.util.Arrays;

@Proxy
interface MyInterface {
    String ping();
}
MyInterface proxy = MyInterfaceProxy.create(new InvocationHandler() {
    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        System.out.printf("Invoked %s on %s with args %s\n", method, proxy, Arrays.toString(args));
        return null;
    }
});

Build Configuration

Using gradle:

dependencies {
    compileOnly 'com.palantir.proxy.processor:proxy-annotations'
    annotationProcessor 'com.palantir.proxy.processor:proxy-processor'
}

Gradle Tasks

./gradlew tasks - to get the list of gradle tasks

Start Developing

Run one of the following commands:

  • ./gradlew idea for IntelliJ
  • ./gradlew eclipse for Eclipse

About

A java annotation processor to facilitate dynamic proxy use within closed-world environments.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 99.8%
  • Shell 0.2%