public class PluginClassLoader extends URLClassLoader
Constructor and Description |
---|
PluginClassLoader(@NotNull JavaPluginLoader loader,
@Nullable ClassLoader parent,
@NotNull PluginDescriptionFile description,
@NotNull File dataFolder,
@NotNull File file,
@Nullable ClassLoader libraryLoader) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected Class<?> |
findClass(String name) |
JavaPlugin |
getPlugin() |
URL |
getResource(String name) |
Enumeration<URL> |
getResources(String name) |
protected Class<?> |
loadClass(String name,
boolean resolve) |
String |
toString() |
protected byte[] |
transformBytecode(byte[] bytecode) |
addURL, definePackage, findResource, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstance
defineClass, defineClass
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
public PluginClassLoader(@NotNull @NotNull JavaPluginLoader loader, @Nullable @Nullable ClassLoader parent, @NotNull @NotNull PluginDescriptionFile description, @NotNull @NotNull File dataFolder, @NotNull @NotNull File file, @Nullable @Nullable ClassLoader libraryLoader) throws IOException, InvalidPluginException, MalformedURLException
public JavaPlugin getPlugin()
public URL getResource(String name)
getResource
in class ClassLoader
public Enumeration<URL> getResources(String name) throws IOException
getResources
in class ClassLoader
IOException
protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException
loadClass
in class ClassLoader
ClassNotFoundException
protected Class<?> findClass(String name) throws ClassNotFoundException
findClass
in class URLClassLoader
ClassNotFoundException
protected byte[] transformBytecode(byte[] bytecode)
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class URLClassLoader
IOException
Copyright © 2021. All rights reserved.