Skip to content

Commit 2f77a5f

Browse files
committed
[GR-73222] Specify exact reflection behavior
1 parent 19b01ef commit 2f77a5f

17 files changed

Lines changed: 598 additions & 44 deletions

File tree

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ The documentation for the Truffle framework, for example, is in [_truffle/docs/_
1616
This also applies to languages, tools, and other components maintained in [related repositories](#related-repositories).
1717
Instructions for building GraalVM from source are in [`vm/README.md`](vm/README.md).
1818

19+
- [§FS-003-reflection](substratevm/docs/functional-spec/reflection.md): Java reflection
20+
registration and run-time access.
21+
- [§AR-002-reflection](substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/reflect/ReflectionDataBuilder.java):
22+
reflection metadata architecture.
23+
1924
## Get Support
2025

2126
* Open a [GitHub issue][issues] for reproducible bugs and concrete feature requests.

substratevm/docs/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,16 @@ Consulting the CI configurations in ci/ci.jsonnet may help understand how `mx ga
4343
## Project Terminus
4444

4545
- [Project Terminus](project-terminus.md): overview and design direction for self-hosting Native Image.
46+
47+
## Reflection
48+
49+
- [Java Reflection Registration](functional-spec/reflection.md): class acquisition, metadata queries,
50+
invocation, serialization, and unsafe access.
51+
- [§AR-002-reflection](../src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/reflect/ReflectionDataBuilder.java):
52+
reflection registration, metadata encoding, and run-time enforcement.
53+
54+
## Security Providers
55+
56+
- [JCA Security Provider Inclusion](functional-spec/security-providers.md): required provider inclusion and run-time behavior.
57+
- [§AR-001-security-providers](../src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/jca/SecurityServicesFeature.java):
58+
provider inclusion, verification, and metadata tracing.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Architecture
2+
3+
This directory contains developer-facing architecture records for Native Image.
4+
5+
- [§AR-001-security-providers](../../src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/jca/SecurityServicesFeature.java):
6+
provider inclusion, verification, and metadata tracing.
7+
- [§AR-002-reflection](../../src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/reflect/ReflectionDataBuilder.java):
8+
reflection registration, metadata encoding, and run-time enforcement.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Functional Specifications
2+
3+
This directory contains functional specifications for Native Image.
4+
5+
- [JCA Security Provider Inclusion](security-providers.md): provider lookup and factory-call behavior
6+
based on metadata.
7+
- [Java Reflection Registration](reflection.md): class acquisition, metadata queries, invocation,
8+
serialization, and unsafe access.
9+
- [Functional Decisions](decisions/): product behavior decisions and tradeoffs for the
10+
specifications.
11+
12+
## Notation
13+
14+
The specifications in this directory share the following notation.
15+
16+
Non-normative text appears as an indented note.
17+
It explains or motivates a rule and states no requirement of its own.
18+
19+
> This is non-normative text.
20+
> It gives rationale, intuition, or examples.
21+
22+
A definition that introduces a **bold term** states the exact condition under which that term
23+
applies, with the phrase *if and only if*.
24+
25+
Each specification names its default package.
26+
Whenever it refers to a class or interface using a single identifier N, the intended reference is to
27+
the class or interface named N in that package.
28+
Classes and interfaces from other packages are named by their canonical name, for example
29+
`java.util.ServiceLoader`.
30+
31+
A cross-reference within a specification is shown as §x.y and links to that section.
32+
A reference to The Java Language Specification is written as JLS §12.4, and a reference to the Java
33+
SE API documentation names the specified class, interface, or member.
34+
35+
The specifications use the following terms of the Java Platform specifications with their standard
36+
meaning:
37+
38+
- *Loading* (JLS §12.2) is finding the binary form of a class and constructing a `java.lang.Class`
39+
object for it.
40+
*Creation of a new class instance* (JLS §12.5) is the separate act of instantiating that class.
41+
- *Class initialization* (JLS §12.4) is the execution of a class's static initializers.
42+
- The *binary name* (JLS §13.1) of a class is the name by which reflection metadata,
43+
`java.lang.Class.forName`, and diagnostics identify it.

0 commit comments

Comments
 (0)