T
- Resource
接口实现类public class ResourceClassLoader<T extends Resource> extends SecureClassLoader
Constructor and Description |
---|
ResourceClassLoader(ClassLoader parentClassLoader,
Map<String,T> resourceMap)
构造
|
Modifier and Type | Method and Description |
---|---|
ResourceClassLoader<T> |
addResource(T resource)
增加需要加载的类资源
|
protected Class<?> |
findClass(String name) |
defineClass, defineClass, getPermissions
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
public ResourceClassLoader(ClassLoader parentClassLoader, Map<String,T> resourceMap)
parentClassLoader
- 父类加载器,null表示默认当前上下文加载器resourceMap
- 资源mappublic ResourceClassLoader<T> addResource(T resource)
resource
- 资源,可以是文件、流或者字符串protected Class<?> findClass(String name) throws ClassNotFoundException
findClass
in class ClassLoader
ClassNotFoundException
Copyright © 2024. All rights reserved.