Reflection Config
Taken from reflect-config-schema-v1.0.0.json
- Schema Viewer
- Raw Schema JSON
- Example
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://github.com/oracle/graal/blob/master/docs/reference-manual/native-image/assets/reflect-config-schema-v1.0.0.json",
"default": [],
"items": {
"properties": {
"condition": {
"properties": {
"typeReachable": {
"type": "string",
"title": "Fully qualified class name of the class that must be reachable in order to register the class <name> for reflection"
}
},
"required": [
"typeReachable"
],
"additionalProperties": false,
"type": "object"
},
"name": {
"type": "string",
"title": "Name of the class that should be registered for reflection"
},
"methods": {
"default": [],
"items": {
"properties": {
"name": {
"type": "string",
"title": "Method name that should be registered for this class"
},
"parameterTypes": {
"default": [],
"items": {
"type": "string",
"title": "List of types for the parameters of the this method"
},
"type": "array"
}
},
"required": [
"name"
],
"additionalProperties": false,
"type": "object",
"title": "List of methods from this class that are registered for reflection"
},
"type": "array",
"title": "List of methods that should be registered for the class declared in <name>"
},
"queriedMethods": {
"default": [],
"items": {
"properties": {
"name": {
"type": "string",
"title": "Method name that are queried for this class"
},
"parameterTypes": {
"default": [],
"items": {
"type": "string",
"title": "List of types for the parameters of the this method"
},
"type": "array",
"title": "List of methods to register for this class that are only looked up but not invoked."
}
},
"required": [
"name"
],
"additionalProperties": false,
"type": "object"
},
"type": "array",
"title": "List of methods that are queried for the class declared in <name>"
},
"fields": {
"default": [],
"items": {
"properties": {
"name": {
"type": "string",
"title": "Name of the field that should be registered for reflection"
}
},
"required": [
"name"
],
"additionalProperties": false,
"type": "object"
},
"type": "array",
"title": "List of class fields that can be looked up, read, or modified for the class declared in <name>"
},
"allDeclaredClasses": {
"default": false,
"type": "boolean",
"title": "Register classes which would be returned by the java.lang.Class#getDeclaredClasses call"
},
"allDeclaredMethods": {
"default": false,
"type": "boolean",
"title": "Register methods which would be returned by the java.lang.Class#getDeclaredMethods call"
},
"allDeclaredFields": {
"default": false,
"type": "boolean",
"title": "Register fields which would be returned by the java.lang.Class#getDeclaredFields call"
},
"allDeclaredConstructors": {
"default": false,
"type": "boolean",
"title": "Register constructors which would be returned by the java.lang.Class#getDeclaredConstructors call"
},
"allPublicClasses": {
"default": false,
"type": "boolean",
"title": "Register all public classes which would be returned by the java.lang.Class#getClasses call"
},
"allPublicMethods": {
"default": false,
"type": "boolean",
"title": "Register all public methods which would be returned by the java.lang.Class#getMethods call"
},
"allPublicFields": {
"default": false,
"type": "boolean",
"title": "Register all public fields which would be returned by the java.lang.Class#getFields call"
},
"allPublicConstructors": {
"default": false,
"type": "boolean",
"title": "Register all public constructors which would be returned by the java.lang.Class#getConstructors call"
},
"allRecordComponents": {
"default": false,
"type": "boolean",
"title": "Register record components which would be returned by the java.lang.Class#getRecordComponents call"
},
"allPermittedSubclasses": {
"default": false,
"type": "boolean",
"title": "Register permitted subclasses which would be returned by the java.lang.Class#getPermittedSubclasses call"
},
"allNestMembers": {
"default": false,
"type": "boolean",
"title": "Register nest members which would be returned by the java.lang.Class#getNestMembers call"
},
"allSigners": {
"default": false,
"type": "boolean",
"title": "Register signers which would be returned by the java.lang.Class#getSigners call"
},
"queryAllDeclaredMethods": {
"default": false,
"type": "boolean",
"title": "Register methods which would be returned by the java.lang.Class#getDeclaredMethods call but only for lookup"
},
"queryAllDeclaredConstructors": {
"default": false,
"type": "boolean",
"title": "Register constructors which would be returned by the java.lang.Class#getDeclaredConstructors call but only for lookup"
},
"queryAllPublicMethods": {
"default": false,
"type": "boolean",
"title": "Register all public methods which would be returned by the java.lang.Class#getMethods call but only for lookup"
},
"queryAllPublicConstructors": {
"default": false,
"type": "boolean",
"title": "Register all public constructors which would be returned by the java.lang.Class#getConstructors call but only for lookup"
},
"unsafeAllocated": {
"default": false,
"type": "boolean",
"title": "Allow objects of this class to be instantiated with a call to jdk.internal.misc.Unsafe#allocateInstance"
}
},
"required": [
"name"
],
"additionalProperties": false,
"type": "object"
},
"type": "array",
"title": "JSON schema for the reflect-config that GraalVM Native Image uses"
}
[
{
"name": "java.lang.Class",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"queryAllPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "java.lang.String",
"fields": [
{
"name": "value"
},
{
"name": "hash"
}
],
"methods": [
{
"name": "<init>",
"parameterTypes": []
},
{
"name": "<init>",
"parameterTypes": [
"char[]"
]
},
{
"name": "charAt"
},
{
"name": "format",
"parameterTypes": [
"java.lang.String",
"java.lang.Object[]"
]
}
]
},
{
"name": "java.lang.String$CaseInsensitiveComparator",
"queriedMethods": [
{
"name": "compare"
}
]
}
]