Class SiblingClassLoader
java.lang.Object
java.lang.ClassLoader
com.aspectran.core.context.resource.SiblingClassLoader
Specialized class loader for Aspectran.
-
Constructor Summary
ConstructorsConstructorDescriptionSiblingClassLoader
(ClassLoader parent, String[] resourceLocations) SiblingClassLoader
(String name) SiblingClassLoader
(String[] resourceLocations) SiblingClassLoader
(String name, ClassLoader parent) SiblingClassLoader
(String name, ClassLoader parent, String[] resourceLocations) SiblingClassLoader
(String name, String[] resourceLocations) -
Method Summary
Modifier and TypeMethodDescriptionvoid
excludeClass
(String... classNames) Adds classes that this ClassLoader should not handle.void
excludePackage
(String... packageNames) Adds packages that this ClassLoader should not handle.Class
<?> findResource
(String name) findResources
(String name) int
getId()
getResource
(String name) getResources
(String name) getRoot()
boolean
boolean
boolean
isRoot()
protected Class
<?> void
reload()
toString()
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, getResourceAsStream, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
Constructor Details
-
SiblingClassLoader
- Throws:
InvalidResourceException
-
SiblingClassLoader
- Throws:
InvalidResourceException
-
SiblingClassLoader
- Throws:
InvalidResourceException
-
SiblingClassLoader
- Throws:
InvalidResourceException
-
SiblingClassLoader
- Throws:
InvalidResourceException
-
SiblingClassLoader
public SiblingClassLoader(ClassLoader parent, String[] resourceLocations) throws InvalidResourceException - Throws:
InvalidResourceException
-
SiblingClassLoader
public SiblingClassLoader(String name, ClassLoader parent, String[] resourceLocations) throws InvalidResourceException - Throws:
InvalidResourceException
-
-
Method Details
-
excludePackage
Adds packages that this ClassLoader should not handle. Any class whose fully-qualified name starts with the name registered here will be handled by the parent ClassLoader in the usual fashion.- Parameters:
packageNames
- package names that we be compared against fully qualified package names to exclude
-
excludeClass
Adds classes that this ClassLoader should not handle. Any class whose fully-qualified name starts with the name registered here will be handled by the parent ClassLoader in the usual fashion.- Parameters:
classNames
- class names that we be compared against fully qualified class names to exclude
-
getId
public int getId() -
getRoot
-
isRoot
public boolean isRoot() -
getSiblings
-
hasSiblings
public boolean hasSiblings() -
isFirstborn
public boolean isFirstborn() -
getResourceManager
-
getResourceLocation
-
reload
- Throws:
InvalidResourceException
-
loadClass
- Overrides:
loadClass
in classClassLoader
- Throws:
ClassNotFoundException
-
findClass
- Overrides:
findClass
in classClassLoader
- Throws:
ClassNotFoundException
-
getResource
- Overrides:
getResource
in classClassLoader
-
getResources
- Overrides:
getResources
in classClassLoader
- Throws:
IOException
-
findResource
- Overrides:
findResource
in classClassLoader
-
findResources
- Overrides:
findResources
in classClassLoader
-
getAllResources
-
getAllSiblings
-
toString
-