public class GateClassLoader extends URLClassLoader
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
log |
Constructor and Description |
---|
GateClassLoader(String name)
Default construction - use an empty URL list.
|
GateClassLoader(String name,
ClassLoader parent)
Chaining constructor.
|
GateClassLoader(String name,
URL[] urls)
Default construction with URLs list.
|
GateClassLoader(String name,
URL[] urls,
ClassLoader parent)
Chaining constructor with URLs list.
|
GateClassLoader(String name,
URL[] urls,
ClassLoader parent,
boolean isolated) |
Modifier and Type | Method and Description |
---|---|
void |
addURL(URL url)
Appends the specified URL to the list of URLs to search for classes
and resources.
|
Class<?> |
defineGateClass(String name,
byte[] bytes,
int offset,
int len)
Forward a call to super.defineClass, which is protected and final
in super.
|
Class<?> |
findExistingClass(String name)
Given a fully qualified class name, this method returns the
instance of Class if it is already loaded using the ClassLoader or
it returns null.
|
void |
forgetClassLoader(GateClassLoader classloader)
Causes the specified classloader to be forgotten, making it and all
the class definitions loaded by it available for garbage collection
|
void |
forgetClassLoader(String id)
Causes the specified classloader to be forgotten, making it and all
the class definitions loaded by it available for garbage collection
|
void |
forgetClassLoader(String id,
Plugin dInfo) |
List<GateClassLoader> |
getChildren()
Get the child classloaders in creation order.
|
GateClassLoader |
getDisposableClassLoader(String id)
Returns a classloader that can, at some point in the future, be
forgotton which allows the class definitions to be garbage
collected.
|
GateClassLoader |
getDisposableClassLoader(String id,
boolean isolated) |
GateClassLoader |
getDisposableClassLoader(String id,
ClassLoader parent,
boolean isolated) |
String |
getID() |
URL |
getResource(String name) |
Enumeration<URL> |
getResources(String resource) |
boolean |
isIsolated() |
Class<?> |
loadClass(String name) |
Class<?> |
loadClass(String name,
boolean resolve)
Delegate loading to the super class (loadClass has protected access
there).
|
void |
resolveGateClass(Class<?> c)
Forward a call to super.resolveClass, which is protected and final
in super.
|
String |
toString() |
close, definePackage, findClass, 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, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
public GateClassLoader(String name)
public GateClassLoader(String name, ClassLoader parent)
public GateClassLoader(String name, URL[] urls)
public GateClassLoader(String name, URL[] urls, ClassLoader parent)
public GateClassLoader(String name, URL[] urls, ClassLoader parent, boolean isolated)
public String getID()
public boolean isIsolated()
public void addURL(URL url)
addURL
in class URLClassLoader
public URL getResource(String name)
getResource
in class ClassLoader
public Class<?> loadClass(String name) throws ClassNotFoundException
loadClass
in class ClassLoader
ClassNotFoundException
public Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException
loadClass
in class ClassLoader
ClassNotFoundException
public Class<?> defineGateClass(String name, byte[] bytes, int offset, int len)
public void resolveGateClass(Class<?> c)
public Class<?> findExistingClass(String name)
public GateClassLoader getDisposableClassLoader(String id)
id
- the id of the classloader to returnpublic GateClassLoader getDisposableClassLoader(String id, boolean isolated)
public GateClassLoader getDisposableClassLoader(String id, ClassLoader parent, boolean isolated)
public void forgetClassLoader(String id)
id
- the id of the classloader to forgetpublic void forgetClassLoader(GateClassLoader classloader)
classloader
- the classloader to forgetpublic Enumeration<URL> getResources(String resource) throws IOException
getResources
in class ClassLoader
IOException
public List<GateClassLoader> getChildren()
Copyright © 2024 GATE. All rights reserved.