org.python.compiler
Class ClassFile

java.lang.Object
  extended byorg.python.compiler.ClassFile

public class ClassFile
extends Object


Field Summary
static int ABSTRACT
           
static int FINAL
           
 String name
           
static int NATIVE
           
static int PRIVATE
           
static int PROTECTED
           
static int PUBLIC
           
static int STATIC
           
static int SYNCHRONIZED
           
 
Constructor Summary
ClassFile(String name)
           
ClassFile(String name, String superclass, int access)
           
 
Method Summary
 void addAttribute(Attribute attr)
           
 void addField(String name, String type, int access)
           
 void addInterface(String name)
           
 Code addMethod(String name, String type, int access)
           
static String fixName(String n)
           
 void write(DataOutputStream stream)
           
 void write(OutputStream stream)
           
static void writeAttributes(DataOutputStream stream, Attribute[] atts)
           
 void writeMethods(DataOutputStream stream, Vector methods)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public String name

PUBLIC

public static final int PUBLIC
See Also:
Constant Field Values

PRIVATE

public static final int PRIVATE
See Also:
Constant Field Values

PROTECTED

public static final int PROTECTED
See Also:
Constant Field Values

STATIC

public static final int STATIC
See Also:
Constant Field Values

FINAL

public static final int FINAL
See Also:
Constant Field Values

SYNCHRONIZED

public static final int SYNCHRONIZED
See Also:
Constant Field Values

NATIVE

public static final int NATIVE
See Also:
Constant Field Values

ABSTRACT

public static final int ABSTRACT
See Also:
Constant Field Values
Constructor Detail

ClassFile

public ClassFile(String name)

ClassFile

public ClassFile(String name,
                 String superclass,
                 int access)
Method Detail

fixName

public static String fixName(String n)

addInterface

public void addInterface(String name)
                  throws IOException
Throws:
IOException

addMethod

public Code addMethod(String name,
                      String type,
                      int access)
               throws IOException
Throws:
IOException

addField

public void addField(String name,
                     String type,
                     int access)
              throws IOException
Throws:
IOException

writeAttributes

public static void writeAttributes(DataOutputStream stream,
                                   Attribute[] atts)
                            throws IOException
Throws:
IOException

writeMethods

public void writeMethods(DataOutputStream stream,
                         Vector methods)
                  throws IOException
Throws:
IOException

addAttribute

public void addAttribute(Attribute attr)
                  throws IOException
Throws:
IOException

write

public void write(DataOutputStream stream)
           throws IOException
Throws:
IOException

write

public void write(OutputStream stream)
           throws IOException
Throws:
IOException