https://github.com/palantir/graal-annotations
basic annotations and associated processors to make working with GraalVM easier and more ergonomic
https://github.com/palantir/graal-annotations
octo-correct-managed
Last synced: 2 months ago
JSON representation
basic annotations and associated processors to make working with GraalVM easier and more ergonomic
- Host: GitHub
- URL: https://github.com/palantir/graal-annotations
- Owner: palantir
- License: apache-2.0
- Created: 2018-11-07T00:15:55.000Z (over 6 years ago)
- Default Branch: develop
- Last Pushed: 2024-04-11T12:28:06.000Z (about 1 year ago)
- Last Synced: 2024-04-14T09:44:18.302Z (about 1 year ago)
- Topics: octo-correct-managed
- Language: Java
- Homepage:
- Size: 162 KB
- Stars: 10
- Watchers: 216
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
Graal Annotations and Processors
================================
Basic annotations and associated processors to make working with GraalVM easier and more
ergonomic.```gradle
dependencies {
annotationProcessor 'com.palantir.graal.annotations:graal-annotations-processors:'
compileOnly 'com.palantir.graal.annotations:graal-annotations-api:'
}
````@GraalReflectable`
-------------------
To make use of reflection with AOT compilation, GraalVM requires explicit reflection
invocations or may use a [configuration file][1] to explicitly document the classes,
constructors, methods and fields that may be used in reflection invocations.Labeling any class, constructor, method or field with `@GraalReflectable` will generate
a file in SubstrateVM's configuration format suitable for passing to native-image
with the `-H:ReflectionConfigurationResources` or `-H:ReflectionConfigurationFiles`
arguments.When applied to a class, `@GraalReflectable` supports the following options:
* allPublicConstructors: default `true`
* allPublicFields: default `true`
* allPublicMethods: default `true`
* allDeclaredConstructors: default `false`
* allDeclaredFields: default `false`
* allDeclaredMethods: default `false`When applied to a field, `@GraalReflectable` supports the following options:
* allowWrite: default `false`To make use of the annotation, one should configure the corresponding annotation
processor provided by `com.palantir.graal.annotations:graal-annotation-processors`
bundle.The configuration file will be emitted to `META-INF/graal/reflection-config.json`.
[1]:https://github.com/oracle/graal/blob/master/substratevm/REFLECTION.md
Contributions
-------------
Contributions are welcome. For larger feature requests or contributions, we prefer discussing the proposed change on
a GitHub issue prior to a PR.License
-------
This library is made available under the [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0).