Interface ConfiguredPluginClassLoader
- All Superinterfaces:
- AutoCloseable,- Closeable
- All Known Implementing Classes:
- PluginClassLoader
The configured plugin class loader represents an internal abstraction over the classloaders used by the server
 to load and access a plugins classes during runtime.
 
 It implements Closeable to define the ability to shutdown and close the classloader that implements this
 interface.
- 
Method SummaryModifier and TypeMethodDescriptionProvides the configuration of the plugin that this plugin classloader provides type access to.getGroup()Get the plugin classloader group that is used by the underlying classloaderGets the plugin held by this class loader.voidinit(JavaPlugin plugin) Initializes both this configured plugin class loader and the java plugin passed to link to each other.Class<?>Attempts to load a class from this plugin class loader using the passed fully qualified name.
- 
Method Details- 
getConfigurationPluginMeta getConfiguration()Provides the configuration of the plugin that this plugin classloader provides type access to.- Returns:
- the plugin meta instance, holding all meta information about the plugin instance.
 
- 
loadClassClass<?> loadClass(@NotNull @NotNull String name, boolean resolve, boolean checkGlobal, boolean checkLibraries) throws ClassNotFoundException Attempts to load a class from this plugin class loader using the passed fully qualified name. This lookup logic can be configured through the following parameters to define how wide or how narrow the class lookup should be.- Parameters:
- name- the fully qualified name of the class to load
- resolve- whether the class should be resolved if needed or not
- checkGlobal- whether this lookup should check transitive dependencies, including either the legacy spigot global class loader or the paper- PluginClassLoaderGroup
- checkLibraries- whether the defined libraries should be checked for the class or not
- Returns:
- the class found at the fully qualified class name passed under the passed restrictions
- Throws:
- ClassNotFoundException- if the class could not be found considering the passed restrictions
- See Also:
 
- 
initInitializes both this configured plugin class loader and the java plugin passed to link to each other. This logic is to be called exactly once when the initial setup between the class loader and the instantiatedJavaPluginis loaded.- Parameters:
- plugin- the- JavaPluginthat should be interlinked with this class loader.
 
- 
getPluginGets the plugin held by this class loader.- Returns:
- the plugin or null if it doesn't exist yet
 
- 
getGroupGet the plugin classloader group that is used by the underlying classloader- Returns:
- classloader
 
 
-