-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce more flexible type descriptors for JSON configuration
- Loading branch information
Showing
20 changed files
with
463 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
docs/reference-manual/native-image/assets/config-condition-schema-v1.0.0.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2019-09/schema", | ||
"$id": "https://github.com/oracle/graal/blob/master/docs/reference-manual/native-image/assets/config-condition-schema-v1.0.0.json", | ||
"title": "JSON schema for the conditions used in GraalVM Native Image configuration files", | ||
"properties": { | ||
"typeReachable": { | ||
"type": "string", | ||
"title": "Fully qualified name of a class that must be reachable in order to register the type <type> for reflection" | ||
} | ||
}, | ||
"required": [ | ||
"typeReachable" | ||
], | ||
"additionalProperties": false, | ||
"type": "object" | ||
} |
6 changes: 6 additions & 0 deletions
6
docs/reference-manual/native-image/assets/config-type-schema-v1.0.0.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2019-09/schema", | ||
"$id": "https://github.com/oracle/graal/blob/master/docs/reference-manual/native-image/assets/config-type-schema-v1.0.0.json", | ||
"type": "string", | ||
"title": "JSON schema for the type descriptors GraalVM Native Image configuration files use" | ||
} |
104 changes: 104 additions & 0 deletions
104
docs/reference-manual/native-image/assets/jni-config-schema-v1.1.0.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2019-09/schema", | ||
"$id": "https://github.com/oracle/graal/blob/master/docs/reference-manual/native-image/assets/jni-config-schema-v1.1.0.json", | ||
"default": [], | ||
"items": { | ||
"properties": { | ||
"condition": { | ||
"$ref": "config-condition-schema-v1.0.0.json", | ||
"title": "Condition under which the class should be registered for access through JNI" | ||
}, | ||
"type": { | ||
"$ref": "config-type-schema-v1.0.0.json", | ||
"title": "Type descriptor of the class that should be registered for access through JNI" | ||
}, | ||
"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 the method's parameter types" | ||
}, | ||
"type": "array" | ||
} | ||
}, | ||
"required": [ | ||
"name" | ||
], | ||
"additionalProperties": false, | ||
"type": "object", | ||
"title": "List of methods from this class that are registered for access through JNI" | ||
}, | ||
"type": "array", | ||
"title": "List of methods that should be registered for the class declared in <name>" | ||
}, | ||
"fields": { | ||
"default": [], | ||
"items": { | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"title": "Name of the field that should be registered for access through JNI" | ||
} | ||
}, | ||
"required": [ | ||
"name" | ||
], | ||
"additionalProperties": false, | ||
"type": "object" | ||
}, | ||
"type": "array", | ||
"title": "List of fields that should be registered for the class declared in <name>" | ||
}, | ||
"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" | ||
}, | ||
"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" | ||
}, | ||
"unsafeAllocated": { | ||
"default": false, | ||
"type": "boolean", | ||
"title": "Allow objects of this class to be instantiated with a call to jdk.internal.misc.Unsafe#allocateInstance" | ||
} | ||
}, | ||
"required": [ | ||
"type" | ||
], | ||
"additionalProperties": false, | ||
"type": "object" | ||
}, | ||
"type": "array", | ||
"title": "JSON schema for the JNI configuration that GraalVM Native Image uses" | ||
} |
104 changes: 104 additions & 0 deletions
104
docs/reference-manual/native-image/assets/reflect-config-schema-v1.1.0.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
{ | ||
"$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.1.0.json", | ||
"default": [], | ||
"items": { | ||
"properties": { | ||
"condition": { | ||
"$ref": "config-condition-schema-v1.0.0.json", | ||
"title": "Condition under which the class should be registered for reflection" | ||
}, | ||
"type": { | ||
"$ref": "config-type-schema-v1.0.0.json", | ||
"title": "Type descriptor 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 the method's parameter types" | ||
}, | ||
"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 type declared in <type>" | ||
}, | ||
"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 type declared in <type>" | ||
}, | ||
"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" | ||
}, | ||
"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" | ||
}, | ||
"unsafeAllocated": { | ||
"default": false, | ||
"type": "boolean", | ||
"title": "Allow objects of this class to be instantiated with a call to jdk.internal.misc.Unsafe#allocateInstance" | ||
} | ||
}, | ||
"required": [ | ||
"type" | ||
], | ||
"additionalProperties": false, | ||
"type": "object" | ||
}, | ||
"type": "array", | ||
"title": "JSON schema for the reflection configuration that GraalVM Native Image uses" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.