Package org.bukkit.plugin.java

# Class PluginClassLoader

java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
org.bukkit.plugin.java.PluginClassLoader

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`

public final class PluginClassLoader extends URLClassLoader
A ClassLoader for plugins, to allow shared classes across multiple plugins

## Method Summary

Modifier and Type
Method
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()`

### Methods inherited from class java.net.URLClassLoader

`addURL, definePackage, findResource, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstance`

### Methods inherited from class java.security.SecureClassLoader

`defineClass, defineClass`

### Methods inherited from class java.lang.ClassLoader

`clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Method Details

### getPlugin

public JavaPlugin getPlugin()

### getResource

public URL getResource(String name)

Overrides:
  `getResource` in class `ClassLoader`

### getResources

public Enumeration<URL> getResources(String name) throws IOException

Overrides:
  `getResources` in class `ClassLoader`
Throws:
  `IOException`

### loadClass

protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException

Overrides:
  `loadClass` in class `ClassLoader`
Throws:
  `ClassNotFoundException`

### findClass

protected Class<?> findClass(String name) throws ClassNotFoundException

Overrides:
  `findClass` in class `URLClassLoader`
Throws:
  `ClassNotFoundException`

### close

public void close() throws IOException

Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in interface `Closeable`
Overrides:
  `close` in class `URLClassLoader`
Throws:
  `IOException`

### toString

public String toString()

Overrides:
  `toString` in class `Object`