public interface SharedClassHelperFactory
SharedClassHelperFactory provides an interface that is used to create various types of SharedClassHelper for ClassLoaders.
ClassLoaders and SharedClassHelpers have a one-to-one relationship. Any attempts to get a helper for a ClassLoader that already has a different type of helper will result in a HelperAlreadyDefinedException.
There are 3 different types of SharedClassHelper:| Modifier and Type | Method and Description |
|---|---|
SharedClassHelper |
findHelperForClassLoader(ClassLoader loader)
Utility function that returns a SharedClassHelper for a given ClassLoader.
|
SharedClassTokenHelper |
getTokenHelper(ClassLoader loader)
Returns a SharedClassTokenHelper for a given ClassLoader.
|
SharedClassTokenHelper |
getTokenHelper(ClassLoader loader,
SharedClassFilter filter)
Returns a SharedClassTokenHelper for a given ClassLoader.
|
SharedClassURLClasspathHelper |
getURLClasspathHelper(ClassLoader loader,
URL[] classpath)
Returns a SharedClassURLClasspathHelper for a given ClassLoader.
|
SharedClassURLClasspathHelper |
getURLClasspathHelper(ClassLoader loader,
URL[] classpath,
SharedClassFilter filter)
Returns a SharedClassURLClasspathHelper for a given ClassLoader.
|
SharedClassURLHelper |
getURLHelper(ClassLoader loader)
Returns a SharedClassURLHelper for a given ClassLoader.
|
SharedClassURLHelper |
getURLHelper(ClassLoader loader,
SharedClassFilter filter)
Returns a SharedClassURLHelper for a given ClassLoader.
|
SharedClassTokenHelper getTokenHelper(ClassLoader loader) throws HelperAlreadyDefinedException
Returns a SharedClassTokenHelper for a given ClassLoader.
Creates a new SharedClassTokenHelper if one cannot be found, otherwise returns an existing SharedClassTokenHelper.
Throws a HelperAlreadyDefinedException if the ClassLoader already has a different type of helper.
Returns null if a SecurityManager is installed and there is no SharedClassPermission for the ClassLoader specified.
loader - ClassLoader.
ClassLoader to which this SharedClassTokenHelper will belongHelperAlreadyDefinedException - when another helper has been already defined for this class loader.SharedClassTokenHelperSharedClassTokenHelper getTokenHelper(ClassLoader loader, SharedClassFilter filter) throws HelperAlreadyDefinedException
Returns a SharedClassTokenHelper for a given ClassLoader.
Creates a new SharedClassTokenHelper if one cannot be found, otherwise returns existing SharedClassTokenHelper.
Throws a HelperAlreadyDefinedException if the ClassLoader already has a different type of helper.
Returns null if a SecurityManager is installed and there is no SharedClassPermission for the ClassLoader specified.
loader - ClassLoader.
ClassLoader to which this SharedClassTokenHelper will belongfilter - SharedClassURLFilter.
Specify a filter which limits the classes that are found or stored in the cacheHelperAlreadyDefinedException - when another helper has been already defined for this class loaderSharedClassTokenHelperSharedClassURLHelper getURLHelper(ClassLoader loader) throws HelperAlreadyDefinedException
Returns a SharedClassURLHelper for a given ClassLoader.
Creates a new SharedClassURLHelper if one cannot be found, otherwise returns existing SharedClassURLHelper.
Throws a HelperAlreadyDefinedException if the ClassLoader already has a different type of helper.
Returns null if a SecurityManager is installed and there is no SharedClassPermission for the ClassLoader specified.
loader - ClassLoader.
ClassLoader to which this SharedClassURLHelper will belongHelperAlreadyDefinedException - when another helper has been already defined for this class loaderSharedClassURLHelperSharedClassURLClasspathHelper getURLClasspathHelper(ClassLoader loader, URL[] classpath) throws HelperAlreadyDefinedException
Returns a SharedClassURLClasspathHelper for a given ClassLoader.
Creates a new SharedClassURLClasspathHelper if one cannot be found, otherwise if the classpath specified matches the classpath of an existing helper, returns existing SharedClassURLClasspathHelper.
Throws a HelperAlreadyDefinedException if the ClassLoader already has a different type of helper, or if the ClassLoader has a SharedClassURLClasspathHelper with a different classpath.
Returns null if a SecurityManager is installed and there is no SharedClassPermission for the ClassLoader specified.
loader - ClassLoader.
ClassLoader to which this SharedClassURLClasspathHelper will belongclasspath - URL[].
The current URL classpath of this ClassLoaderHelperAlreadyDefinedException - when another helper has been already defined for this class loaderSharedClassURLClasspathHelperSharedClassURLClasspathHelper getURLClasspathHelper(ClassLoader loader, URL[] classpath, SharedClassFilter filter) throws HelperAlreadyDefinedException
Returns a SharedClassURLClasspathHelper for a given ClassLoader.
Creates a new SharedClassURLClasspathHelper if one cannot be found, otherwise if the classpath specified matches the classpath of an existing helper, returns existing SharedClassURLClasspathHelper.
If a new SharedClassHelper is created, the specified SharedClassURLFilter is applied to it. If the filter argument is null, no filter is applied.
Throws a HelperAlreadyDefinedException if the ClassLoader already has a different type of helper OR if the ClassLoader has a SharedClassURLClasspathHelper with a different classpath.
Returns null if a SecurityManager is installed and there is no SharedClassPermission for the ClassLoader specified.
loader - ClassLoader.
ClassLoader to which this SharedClassURLClasspathHelper will belongclasspath - URL[].
The current URL classpath of this ClassLoaderfilter - SharedClassURLFilter.
Specify a filter which limits the classes that are found or stored in the cacheHelperAlreadyDefinedException - when another helper has been already defined for this class loaderSharedClassURLClasspathHelper,
SharedClassFilterSharedClassURLHelper getURLHelper(ClassLoader loader, SharedClassFilter filter) throws HelperAlreadyDefinedException
Returns a SharedClassURLHelper for a given ClassLoader.
Creates a new SharedClassURLHelper if one cannot be found, otherwise returns existing SharedClassURLHelper.
If a new SharedClassHelper is created, the specified SharedClassURLFilter is applied to it. If the filter argument is null, no filter is applied.
Throws a HelperAlreadyDefinedException if the ClassLoader already has a different type of helper.
Returns null if a SecurityManager is installed and there is no SharedClassPermission for the ClassLoader specified.
loader - ClassLoader.
ClassLoader to which this SharedClassURLHelper will belongfilter - SharedClassURLFilter.
Specify a filter which limits the classes that are found or stored in the cacheHelperAlreadyDefinedException - when another helper has been already defined for this class loaderSharedClassURLHelper,
SharedClassFilterSharedClassHelper findHelperForClassLoader(ClassLoader loader)
Utility function that returns a SharedClassHelper for a given ClassLoader.
Can be used to determine whether a given ClassLoader already has a helper, before calling a getter method.
Returns an existing SharedClassHelper or null.
loader - ClassLoader.
ClassLoader which may or may not have a SharedClassHelperSharedClassHelperEclipse OpenJ9 website.
To raise a bug report or suggest an improvement create an Eclipse OpenJ9 issue.
Copyright © 1998, 2025 IBM Corp. and others.