--- old/src/java.base/share/classes/java/lang/ClassLoader.java 2016-10-10 15:32:49.000000000 -0700 +++ new/src/java.base/share/classes/java/lang/ClassLoader.java 2016-10-10 15:32:49.000000000 -0700 @@ -104,9 +104,9 @@ * class or resource itself. * *

Class loaders that support concurrent loading of classes are known as - * parallel capable class loaders and are required to register - * themselves at their class initialization time by invoking the - * {@link + * {@linkplain #isParallelCapable() parallel capable} class loaders and + * are required to register themselves at their class initialization time by + * invoking the {@link * #registerAsParallelCapable ClassLoader.registerAsParallelCapable} * method. Note that the ClassLoader class is registered as parallel * capable by default. However, its subclasses still need to register themselves @@ -1443,7 +1443,7 @@ } /** - * Registers the caller as parallel capable. + * Registers the caller as {@linkplain #isParallelCapable() parallel capable}. * The registration succeeds if and only if all of the following * conditions are met: *

    @@ -1457,6 +1457,8 @@ * @return true if the caller is successfully registered as * parallel capable and false if otherwise. * + * @see #isParallelCapable() + * * @since 1.7 */ @CallerSensitive @@ -1467,6 +1469,22 @@ } /** + * Returns {@code true} if this class loader is + * {@linkplain #registerAsParallelCapable parallel capable}, otherwise + * {@code false}. + * + * @return {@code true} if this class loader is parallel capable, + * otherwise {@code false}. + * + * @see #registerAsParallelCapable() + * + * @since 9 + */ + public final boolean isParallelCapable() { + return ParallelLoaders.isRegistered(this.getClass()); + } + + /** * Find a resource of the specified name from the search path used to load * classes. This method locates the resource through the system class * loader (see {@link #getSystemClassLoader()}).