Package EDU.purdue.cs.bloat.reflect
Interface ClassInfoLoader
-
- All Known Implementing Classes:
ClassFileLoader,JarFileCommitter
public interface ClassInfoLoaderClassInfoLoader provides an interface for loading classes. Implementing classes can load classes from a file, from the JVM, or elsewhere.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ClassInfoloadClass(java.lang.String name)Load a class.ClassInfonewClass(int modifiers, int classIndex, int superClassIndex, int[] interfaceIndexes, java.util.List constants)Creates a new class or interface.java.io.OutputStreamoutputStreamFor(ClassInfo info)Returns anOutputStreamto which a class should be written.
-
-
-
Method Detail
-
loadClass
ClassInfo loadClass(java.lang.String name) throws java.lang.ClassNotFoundException
Load a class.- Parameters:
name- The name of the class to load, including the package name.- Returns:
- A ClassInfo for the class.
- Throws:
java.lang.ClassNotFoundException- The class cannot be found in the class path.- See Also:
ClassInfo
-
newClass
ClassInfo newClass(int modifiers, int classIndex, int superClassIndex, int[] interfaceIndexes, java.util.List constants)
Creates a new class or interface.- Parameters:
modifiers- The modifiers describing the newly-created classclassIndex- The index of the name of the newly-created class in its constant poolsuperClassIndex- The index of the name of the newly-created class's superclass in its constant poolinterfaceIndexes- The indexes of the names of the interfaces that the newly-created class implementsconstants- The constant pool for the newly created class (a list ofConstants).
-
outputStreamFor
java.io.OutputStream outputStreamFor(ClassInfo info) throws java.io.IOException
Returns anOutputStreamto which a class should be written.- Throws:
java.io.IOException
-
-