GithubHelp home page GithubHelp logo

palantir / graal-annotations Goto Github PK

View Code? Open in Web Editor NEW
10.0 218.0 3.0 166 KB

basic annotations and associated processors to make working with GraalVM easier and more ergonomic

License: Apache License 2.0

Shell 0.18% Java 99.82%
octo-correct-managed

graal-annotations's Introduction

Graal Annotations and Processors

Basic annotations and associated processors to make working with GraalVM easier and more ergonomic.

dependencies {
    annotationProcessor 'com.palantir.graal.annotations:graal-annotations-processors:<version>'
    compileOnly 'com.palantir.graal.annotations:graal-annotations-api:<version>'
}

@GraalReflectable

To make use of reflection with AOT compilation, GraalVM requires explicit reflection invocations or may use a configuration file 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.

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.

graal-annotations's People

Contributors

iamdanfox avatar markelliot avatar svc-excavator-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.