graal-reflection-configuration

null

License

License

Categories

Categories

Configuration Application Layer Libs config Graal
GroupId

GroupId

com.mageddo
ArtifactId

ArtifactId

graal-reflection-configuration
Last Version

Last Version

2.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

graal-reflection-configuration
null
Project URL

Project URL

https://github.com/mageddo/graal-reflection-configuration-generator.git
Source Code Management

Source Code Management

https://github.com/mageddo/graal-reflection-configuration-generator

Download graal-reflection-configuration

How to add to project

<!-- https://jarcasting.com/artifacts/com.mageddo/graal-reflection-configuration/ -->
<dependency>
    <groupId>com.mageddo</groupId>
    <artifactId>graal-reflection-configuration</artifactId>
    <version>2.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.mageddo/graal-reflection-configuration/
implementation 'com.mageddo:graal-reflection-configuration:2.0.0'
// https://jarcasting.com/artifacts/com.mageddo/graal-reflection-configuration/
implementation ("com.mageddo:graal-reflection-configuration:2.0.0")
'com.mageddo:graal-reflection-configuration:jar:2.0.0'
<dependency org="com.mageddo" name="graal-reflection-configuration" rev="2.0.0">
  <artifact name="graal-reflection-configuration" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.mageddo', module='graal-reflection-configuration', version='2.0.0')
)
libraryDependencies += "com.mageddo" % "graal-reflection-configuration" % "2.0.0"
[com.mageddo/graal-reflection-configuration "2.0.0"]

Dependencies

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

Archived

I wrote a annotatation processor instead, take a look https://github.com/mageddo-projects/annotation-processing-tools/tree/master/reflection-config-generator

Graal Reflection Configuration Generator provides an easy way to geenrate GraalVM reflection config files, configure the plugin on your gradle project, annotate the desired class class with @RuntimeReflection run the gradle build then you're done.

See an example app

Using

Gradle dependencies

dependencies {
  compileOnly("com.mageddo.nativeimage:reflection-config-generator:2.1.1")
  annotationProcessor("com.mageddo.nativeimage:reflection-config-generator:2.1.1")
}

Consider the following example

package com.acme;

import nativeimage.Reflection;

@Reflection(declaredConstructors = true, declaredFields = true)
public class Fruit {
  private String name;
  private String color;   
}

it will automatically configure reflection for Fruit props when compiling using native-image generating a json like

[
  {
    "name" : "com.acme.Fruit",
    "allDeclaredConstructors" : true,
    "allPublicConstructors" : false,
    "allDeclaredMethods" : false,
    "allPublicMethods" : false,
    "allPublicFields" : false,
    "allDeclaredFields" : true
  }
]

Versions

Version
2.0.0
1.0.1
1.0.0