Skip to content

Latest commit

 

History

History
49 lines (40 loc) · 1.24 KB

README.md

File metadata and controls

49 lines (40 loc) · 1.24 KB

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