You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference-manual/native-image/ReachabilityMetadata.md
+35-38Lines changed: 35 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,7 @@ Computing metadata in code can be achieved in two ways:
61
61
return aClass;
62
62
}
63
63
}
64
-
```
64
+
```
65
65
66
66
When metadata is computed in code, the dynamically accessed elements will be included into the native executable's heap only if that part of the heap is reachable through an enclosing method (for example, `ReflectiveAccess#fetchFoo`) or a static field (for example, `InitializedAtBuildTime.aClass`).
67
67
@@ -89,6 +89,8 @@ A condition is specified in the following way:
89
89
An entry with a `typeReachable` condition is considered only when the fully-qualified class is reachable.
90
90
Currently, we support only `typeReachable` as a condition.
91
91
92
+
Find more examples of the configuration files in the [GraalVM Reachability Metadata repository](https://github.com/oracle/graalvm-reachability-metadata).
93
+
92
94
## Metadata Types
93
95
94
96
Native Image accepts the following types of reachability metadata:
The schema also includes further details and explanations how this configuration works. Here is the example of the serialization-config.json:
370
372
```json
371
373
{
372
374
"types": [
@@ -397,12 +399,6 @@ Metadata for serialization is provided in `serialization-config.json` files.
397
399
}
398
400
```
399
401
400
-
Each entry in `types` enables serializing and deserializing objects of the class given by `name`.
401
-
402
-
Each entry in `lambdaCapturingTypes` enables lambda serialization: all lambdas declared in the methods of the class given by `name` can be serialized and deserialized.
403
-
404
-
Each entry in `proxies` enables the [Proxy](https://docs.oracle.com/javase/8/docs/technotes/guides/reflection/proxy.html) serialization by providing an interface list that a proxy implements.
405
-
406
402
## Predefined Classes
407
403
408
404
Native Image requires all classes to be known at build time (a "closed-world assumption").
@@ -418,7 +414,10 @@ At runtime, if there is an attempt to load a class with the same name and byteco
418
414
It is not possible to specify predefined classes in code.
419
415
420
416
### Predefined Classes Metadata in JSON
421
-
Metadata for predefined classes is provided in `predefined-classes-config.json` files.
417
+
418
+
Predefined classes metadata should be specified in a _predefined-classes-config.json_ file and conform to the JSON schema defined in
0 commit comments