edu.yale.emailet
Class InlineClass

java.lang.Object
  |
  +--edu.yale.emailet.InlineClass
All Implemented Interfaces:
java.io.Serializable

public class InlineClass
extends java.lang.Object
implements java.io.Serializable

Author:
Hong Jiang I call classes embed in emailet documents (EmailetDoc objects) "inline classes". A vector of InlineClass objects is serialized when a EmailetDoc object is written to a stream by EmailetDoc.writeToStream()
See Also:
EmailetDoc, Serialized Form

Constructor Summary
InlineClass(java.lang.String name)
           
InlineClass(java.lang.String cname, byte[] cbody)
           
InlineClass(java.lang.String name, java.lang.String repository)
           
 
Method Summary
 boolean equals(InlineClass another)
          Two classes are equal if they have the same name.
 byte[] getBody()
          returns the byte code of this class
 java.lang.String getName()
          returns the name of the class
 void loadBody(java.lang.String classRoot)
          Load the bytecode of a class from a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InlineClass

public InlineClass(java.lang.String name)
Parameters:
name - The class name of the inline class

InlineClass

public InlineClass(java.lang.String cname,
                   byte[] cbody)

InlineClass

public InlineClass(java.lang.String name,
                   java.lang.String repository)
            throws java.io.IOException
Method Detail

equals

public boolean equals(InlineClass another)
Two classes are equal if they have the same name. (Will this have a security implication?)


loadBody

public void loadBody(java.lang.String classRoot)
              throws java.io.IOException
Load the bytecode of a class from a file. The file name is inferred by the classes name: Dots are replaced by "/", the ".class" surfix is added.

Parameters:
classRoot - Prefix to the path where the class can be found.
java.io.IOException

getBody

public byte[] getBody()
returns the byte code of this class


getName

public java.lang.String getName()
returns the name of the class