|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.ClassLoader de.smartics.properties.utils.AbstractProjectClassLoader
public abstract class AbstractProjectClassLoader
Base implementation of class loaders that serve classes from the given directories.
Constructor Summary | |
---|---|
protected |
AbstractProjectClassLoader(ClassLoader parent) Default constructor. |
Method Summary | |
---|---|
protected void |
ensurePackageProvided(String className) Ensures that the package of a class specified by the given name is already defined. |
protected Class<?> |
loadClassFile(String className, File classFile) Loads the class. |
protected Class<?> |
loadClassFromLibrary(String className, String fileName, File dirName) Opens a reader to the class file within the archive. |
protected URL |
loadResourceFromLibrary(String resourceName, String fileName, File dirName) Opens a reader to the resource file within the archive. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractProjectClassLoader(ClassLoader parent)
parent
- the parent class loader.
Method Detail |
---|
protected final void ensurePackageProvided(String className)
className
- the name of the class whose package is to check to be already defined.
protected final Class<?> loadClassFile(String className, File classFile) throws ClassNotFoundException
className
- the name of the class.
classFile
- the file with the binary data.
ClassNotFoundException
- if the class cannot be loaded.
protected final Class<?> loadClassFromLibrary(String className, String fileName, File dirName) throws ClassNotFoundException
className
- the name of the class to load.
fileName
- the name of the class file to load.
dirName
- the name of the directory the archive file is located.
ClassNotFoundException
- if the class cannot be found.
protected final URL loadResourceFromLibrary(String resourceName, String fileName, File dirName) throws IOException
resourceName
- the name of the resource to load.
fileName
- the name of the resource file to load.
dirName
- the name of the directory the archive file is located.
IOException
- if the class cannot be found.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |