Package org.glassfish.rmic.iiop
Class DirectoryLoader
- java.lang.Object
-
- java.lang.ClassLoader
-
- org.glassfish.rmic.iiop.DirectoryLoader
-
public class DirectoryLoader extends java.lang.ClassLoader
DirectoryLoader is a simple ClassLoader which loads from a specified file system directory.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
DirectoryLoader()
DirectoryLoader(java.io.File rootDir)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private byte[]
getClassFileData(java.lang.String className)
Reurn a byte array containing the contents of the class file.java.lang.Class<?>
loadClass(java.lang.String className)
Convenience version of loadClass which sets 'resolve' == true.java.lang.Class<?>
loadClass(java.lang.String className, boolean resolve)
This is the required version of loadClass which is called both from loadClass above and from the internal function FindClassFromClass.-
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
-
-
-
Method Detail
-
loadClass
public java.lang.Class<?> loadClass(java.lang.String className) throws java.lang.ClassNotFoundException
Convenience version of loadClass which sets 'resolve' == true.- Overrides:
loadClass
in classjava.lang.ClassLoader
- Throws:
java.lang.ClassNotFoundException
-
loadClass
public java.lang.Class<?> loadClass(java.lang.String className, boolean resolve) throws java.lang.ClassNotFoundException
This is the required version of loadClass which is called both from loadClass above and from the internal function FindClassFromClass.- Overrides:
loadClass
in classjava.lang.ClassLoader
- Throws:
java.lang.ClassNotFoundException
-
getClassFileData
private byte[] getClassFileData(java.lang.String className)
Reurn a byte array containing the contents of the class file. Returns null if an exception occurs.
-
-