Package com.github.hypfvieh.classloader
Class ClassLoaderWithRegistry
java.lang.Object
java.lang.ClassLoader
com.github.hypfvieh.classloader.ClassLoaderWithRegistry
Custom classloader to register certain classes to ComponentRegistry.
- Author:
- hypfvieh
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExcludedClassName(String _excludedClassName) Add a class which should not be loaded with this classloader even if it is in 'includedPackages' List.voidaddIncludedPackageNames(String _packageName) Add a package name which should be loaded with this classloader.static Stringprotected Class<?>Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findClass, findLibrary, findLoadedClass, findResource, findResource, findResources, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
Constructor Details
-
ClassLoaderWithRegistry
-
ClassLoaderWithRegistry
public ClassLoaderWithRegistry()
-
-
Method Details
-
addIncludedPackageNames
Add a package name which should be loaded with this classloader.- Parameters:
_packageName- name of the package, has to end with '.'
-
addExcludedClassName
Add a class which should not be loaded with this classloader even if it is in 'includedPackages' List.- Parameters:
_excludedClassName- fqcn to exclude
-
loadClass
- Overrides:
loadClassin classClassLoader- Throws:
ClassNotFoundException
-
getVersion
-