<dependency>
<groupId>org.apache.geronimo.arthur</groupId>
<artifactId>arthur-api</artifactId>
<version>${arthur.version}</version>
</dependency>
Arthur API enables you to mark in your code some Graal metainformation. Under the hood it just uses a meta-extension linked to this specific API.
For more information about extensions, see SPI documentation.
<dependency>
<groupId>org.apache.geronimo.arthur</groupId>
<artifactId>arthur-api</artifactId>
<version>${arthur.version}</version>
</dependency>
@Register*
annotation enables to register reflection and resources on your classes directly.
Example:
@RegisterClass(all = true) (1)
public class All {
private String name;
public All() {
// no-op
}
public All(final String name) {
this.name = name;
}
public boolean isAll() {
return true;
}
}
1 | will register the public constructors, fields and methods as available in the native image. |
Previous: Documentation Next: Arthur SPI
You can set extension.annotation.custom.annotations.class
to a list of custom annotations set on classes to replace RegisterClass
.
Exact configuration value follows this pattern: <custom annotation fully qualified name>[:[<RegisterClass attribute>=value]|*]?
.
A common example is: com.foo.MyAnnot1:all=true,com.foo.MyAnnot2:allPublicMethods=true|allPublicFields=true
.
Similarly extension.annotation.custom.annotations.properties
enables to configure the same thing but to find classes from marked fields or methods.
It is very common with unmanaged @ConfigProperty
classes for example.