public abstract class AbstractClassLoader extends URLClassLoader
| 限定符和类型 | 字段和说明 |
|---|---|
protected ClassLoaderService |
classLoaderService |
protected String |
moduleName |
protected SharedClassService |
sharedClassService |
protected SharedResourceService |
sharedResourceService |
| 构造器和说明 |
|---|
AbstractClassLoader(String moduleName,
URL[] urls) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
debugClassLoadMessage(Class<?> clazz,
String method,
String className) |
protected URL |
getBizResource(String name) |
protected Enumeration<URL> |
getBizResources(String name) |
protected URL |
getExportResource(String name) |
protected Enumeration<URL> |
getExportResources(String name) |
protected URL |
getJavaAgentResource(String name)
One useful example is that when javassist is used with jdk11, the ClassLoader::getResource is used to determine
whether a class exists while compiling new classes.
|
protected Enumeration<URL> |
getJavaAgentResources(String name) |
protected URL |
getJdkResource(String name) |
protected Enumeration<URL> |
getJdkResources(String name) |
protected URL |
getLocalResource(String name) |
protected Enumeration<URL> |
getLocalResources(String name) |
String |
getModuleName() |
URL |
getResource(String name) |
protected abstract URL |
getResource0(String name)
Pay attention to the priority of finding resource: jdk, exported, biz
|
Enumeration<URL> |
getResources(String name) |
protected abstract Enumeration<URL> |
getResources0(String name)
Pay attention to the priority of finding resource: jdk, exported, biz
|
protected Class<?> |
loadAgentClass(String name)
Why we need to load Agent Classes ?
|
protected Class<?> |
loadBizClass(String name) |
protected Class<?> |
loadCabinClass(String name) |
protected Class<?> |
loadClass(String name,
boolean resolve) |
protected abstract Class<?> |
loadClass0(String name,
boolean resolve) |
Class<?> |
loadClassFromClasspath(String name) |
protected Class<?> |
loadFromRecords(String name) |
protected Class<?> |
loadImportClassFromBiz(String name) |
protected Class<?> |
loadJdkClass(String name) |
protected Class<?> |
loadLocalClass(String name) |
protected Class<?> |
loadSharedClass(String name) |
protected boolean |
shouldImportClassFromBiz(String name) |
addURL, close, definePackage, findClass, findResource, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstancedefineClass, defineClassclearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSignersprotected final String moduleName
protected final ClassLoaderService classLoaderService
protected final SharedClassService sharedClassService
protected final SharedResourceService sharedResourceService
public String getModuleName()
protected Class<?> loadClass(String name, boolean resolve) throws CabinLoaderException
loadClass 在类中 ClassLoaderCabinLoaderExceptionpublic Enumeration<URL> getResources(String name) throws IOException
getResources 在类中 ClassLoaderIOExceptionpublic URL getResource(String name)
getResource 在类中 ClassLoaderprotected abstract Class<?> loadClass0(String name, boolean resolve) throws CabinLoaderException
protected abstract Enumeration<URL> getResources0(String name) throws IOException
IOExceptionprotected abstract URL getResource0(String name)
public Class<?> loadClassFromClasspath(String name) throws CabinLoaderException
protected Class<?> loadImportClassFromBiz(String name) throws CabinLoaderException
protected Class<?> loadFromRecords(String name) throws CabinLoaderException
protected Class<?> loadJdkClass(String name) throws CabinLoaderException
protected Class<?> loadCabinClass(String name) throws CabinLoaderException
protected Class<?> loadSharedClass(String name) throws CabinLoaderException
protected Class<?> loadBizClass(String name) throws CabinLoaderException
protected Class<?> loadLocalClass(String name) throws CabinLoaderException
protected Class<?> loadAgentClass(String name) throws CabinLoaderException
protected Enumeration<URL> getJdkResources(String name) throws IOException
IOExceptionprotected Enumeration<URL> getLocalResources(String name) throws IOException
IOExceptionprotected Enumeration<URL> getExportResources(String name) throws IOException
IOExceptionprotected Enumeration<URL> getBizResources(String name) throws IOException
IOExceptionprotected Enumeration<URL> getJavaAgentResources(String name) throws IOException
IOExceptionprotected URL getJavaAgentResource(String name)
protected boolean shouldImportClassFromBiz(String name)
Copyright © 2021. All rights reserved.