Package me.nurio.microkernel.loader
Class KernelClassLoader
- java.lang.Object
-
- java.lang.ClassLoader
-
- java.security.SecureClassLoader
-
- java.net.URLClassLoader
-
- me.nurio.microkernel.loader.KernelClassLoader
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class KernelClassLoader extends URLClassLoader
This class will manage class loading and will make class sharing across modules possible.- See Also:
to see this class in use.
-
-
Constructor Summary
Constructors Constructor Description KernelClassLoader(ModuleReflectionManager moduleReflectionManager, File moduleFile, ModuleYaml moduleYaml, ClassLoader parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Class<?>findClass(String name)protected Class<?>findClass(String name, boolean checkAllModules)-
Methods inherited from class java.net.URLClassLoader
addURL, close, 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, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
-
-
-
Constructor Detail
-
KernelClassLoader
public KernelClassLoader(ModuleReflectionManager moduleReflectionManager, File moduleFile, ModuleYaml moduleYaml, ClassLoader parent) throws IOException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException
-
-
Method Detail
-
findClass
protected Class<?> findClass(String name) throws ClassNotFoundException
- Overrides:
findClassin classURLClassLoader- Throws:
ClassNotFoundException
-
findClass
protected Class<?> findClass(String name, boolean checkAllModules) throws ClassNotFoundException
- Throws:
ClassNotFoundException
-
-