Skip to content

Commit 762d33c

Browse files
Improve javadoc for org.graalvm.nativeimage.impl.ClassLoading(Support)
1 parent 861559d commit 762d33c

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

sdk/src/org.graalvm.nativeimage/src/org/graalvm/nativeimage/impl/ClassLoading.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ public static boolean isSupported() {
6060
}
6161

6262
/**
63-
* Opens a scope in which class loading is not constrained by the reflection configuration. Once
64-
* the returned {@link AutoCloseable} is closed, the previous state is restored.
63+
* Opens a scope in which class loading is not constrained by the reflection configuration for
64+
* the current thread. Once the returned {@link AutoCloseable} is closed, the previous state is
65+
* restored.
6566
*
6667
* @throws IllegalStateException if class loading is not {@linkplain #isSupported() supported}.
6768
*/
@@ -74,8 +75,8 @@ public static ArbitraryClassLoadingScope allowArbitraryClassLoading() {
7475

7576
/**
7677
* Conditionally opens a scope in which class loading is not constrained by the reflection
77-
* configuration. If {@code allowArbitraryClassLoading} is true, behaves like
78-
* {@link #allowArbitraryClassLoading()}. Otherwise, it has no effect.
78+
* configuration for the current thread. If {@code allowArbitraryClassLoading} is true, behaves
79+
* like {@link #allowArbitraryClassLoading()}. Otherwise, it has no effect.
7980
*
8081
* @throws IllegalStateException if class loading is not {@linkplain #isSupported() supported}
8182
* and {@code allowArbitraryClassLoading} is true.

sdk/src/org.graalvm.nativeimage/src/org/graalvm/nativeimage/impl/ClassLoadingSupport.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,28 @@ static ClassLoadingSupport singleton() {
4747
return ImageSingletons.lookup(ClassLoadingSupport.class);
4848
}
4949

50+
/**
51+
* Returns whether runtime class loading is supported.
52+
*/
5053
boolean isSupported();
5154

55+
/**
56+
* Returns false iff the current thread is in a
57+
* {@linkplain #startIgnoreReflectionConfigurationScope() scope} where reflection configuration
58+
* is ignored.
59+
*/
5260
boolean followReflectionConfiguration();
5361

62+
/**
63+
* Starts a scope in which the reflection configuration is ignored for runtime class loading.
64+
* <p>
65+
* That scope can be closed by calling {@link #endIgnoreReflectionConfigurationScope()}.
66+
*/
5467
void startIgnoreReflectionConfigurationScope();
5568

69+
/**
70+
* Ends a scope started by {@link #startIgnoreReflectionConfigurationScope()} for the current
71+
* thread.
72+
*/
5673
void endIgnoreReflectionConfigurationScope();
5774
}

0 commit comments

Comments
 (0)