All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.wizards.builder.ArchiveClassLoader
java.lang.Object
|
+----java.lang.ClassLoader
|
+----com.sun.wizards.builder.ArchiveClassLoader
- public final class ArchiveClassLoader
- extends ClassLoader
ArchiveClassLoader is a class loader that can resolve classes
from the wizard archive.
This class file is meant to be the head of the wizard archive.
The wizard archive will contain classes that comprise the wizard
runtime classes and images as well as initialization data for the
wizard.
Classes are submitted to this class loader from the ArchiveReader.
This class cannot be subclassed.
-
CONSTANT_Class
- The tag value for a class or an
interface.
-
CONSTANT_Double
- The tag value for a constant double.
-
CONSTANT_Fieldref
- The tag value for a class field.
-
CONSTANT_Float
- The tag value for a constant float.
-
CONSTANT_Integer
- The tag value for a constant integer.
-
CONSTANT_InterfaceMethodref
- The tag value for an interface method.
-
CONSTANT_Long
- The tag value for a constant long.
-
CONSTANT_Methodref
- The tag value for a class method.
-
CONSTANT_NameAndType
- The tag value for a field or method that does
not indicate affiliation with a specific
class or interface.
-
CONSTANT_String
- The tag value for a java.lang.String
object.
-
CONSTANT_Utf8
- The tag value for a constant string.
-
ArchiveClassLoader()
- Creates an ArchiveClassLoader object.
-
exit(int)
- Exits the server virtual machine with the specified
exit code.
-
getAttributeOffset(RandomAccessFile, String)
- This method returns the offset within the class bytes where the
specified attribute can be found.
-
getClassBytes(String)
- Retrieves the byte[] representation of the named class
-
getSectionInputStream(FileInputStream)
- This method returns an input stream for a section in the wizard
archive.
-
isClassRegistered(String)
- Find out if the specified class is already registered
with this class loader.
-
loadClass(String, boolean)
- loadClass fulfills the responsibility of a subclass of
ClassLoader.
-
main(String[])
- The main method facilitates running this class as an application.
-
registerClass(String, byte[])
- Register the specified class with the class loader.
CONSTANT_Utf8
public static final byte CONSTANT_Utf8
- The tag value for a constant string.
CONSTANT_Integer
public static final byte CONSTANT_Integer
- The tag value for a constant integer.
CONSTANT_Float
public static final byte CONSTANT_Float
- The tag value for a constant float.
CONSTANT_Long
public static final byte CONSTANT_Long
- The tag value for a constant long.
CONSTANT_Double
public static final byte CONSTANT_Double
- The tag value for a constant double.
CONSTANT_Class
public static final byte CONSTANT_Class
- The tag value for a class or an
interface.
CONSTANT_String
public static final byte CONSTANT_String
- The tag value for a java.lang.String
object.
CONSTANT_Fieldref
public static final byte CONSTANT_Fieldref
- The tag value for a class field.
CONSTANT_Methodref
public static final byte CONSTANT_Methodref
- The tag value for a class method.
CONSTANT_InterfaceMethodref
public static final byte CONSTANT_InterfaceMethodref
- The tag value for an interface method.
CONSTANT_NameAndType
public static final byte CONSTANT_NameAndType
- The tag value for a field or method that does
not indicate affiliation with a specific
class or interface.
ArchiveClassLoader
public ArchiveClassLoader()
- Creates an ArchiveClassLoader object. This constructor can
only be called on an archive. An archive is a copy
of the ArchiveClassLoader class bytes with an attribute
appended that contains class bytes and initialization
data. The attribute gets appended by running a wizard
builder, subclassed from ArchiveWriter.
- See Also:
- writeArchive
getSectionInputStream
public DataInput getSectionInputStream(FileInputStream file)
- This method returns an input stream for a section in the wizard
archive. This method will determine from the archive section if
compression is being used, and return an appropriate input stream.
- Parameters:
- file - The file, correctly positioned to read the desired
archive section.
- Returns:
- An input stream that can read the archive section.
isClassRegistered
public synchronized Boolean isClassRegistered(String classname)
- Find out if the specified class is already registered
with this class loader.
- Parameters:
- classname - The fully qualified name of the class.
- Returns:
- true if the class is already registered. false if the
class has not been registered.
registerClass
public synchronized void registerClass(String classname,
byte classBytes[])
- Register the specified class with the class loader. This must
be done for all of the classes that originate within the archive.
- Parameters:
- classname - The fully qualified name of the class to
register.
- classBytes - The bytes representing the specified class.
loadClass
public synchronized Class loadClass(String name,
boolean resolve)
- loadClass fulfills the responsibility of a subclass of
ClassLoader. This method will load classes either
from the system or from the hashtables within this
class.
- Parameters:
- name - The name of the desired Class.
- resolve - true if the Class needs to be resolved.
- Returns:
- the resulting Class, or null if it was not found.
- Overrides:
- loadClass in class ClassLoader
getClassBytes
public synchronized byte[] getClassBytes(String name)
- Retrieves the byte[] representation of the named class
- Parameters:
- name - The fully qualified name of the class to
retrieve
- Returns:
- The bytes representing the named class
main
public static void main(String args[])
- The main method facilitates running this class as an application.
This is the entry point into the wizard.
exit
public void exit(int exitStatus)
- Exits the server virtual machine with the specified
exit code.
- Parameters:
- exitStatus - The exit code.
getAttributeOffset
public static long getAttributeOffset(RandomAccessFile in,
String attributeName)
- This method returns the offset within the class bytes where the
specified attribute can be found.
- Parameters:
- in - The input file from which the class bytes can be found.
- attributeName - The name of the class attribute to locate.
- Returns:
- The offset of the specified attribute.
All Packages Class Hierarchy This Package Previous Next Index