mycompiler.mybytecode
Class CodeAttribute

java.lang.Object
  extended by mycompiler.mybytecode.Attribute
      extended by mycompiler.mybytecode.CodeAttribute

public class CodeAttribute
extends Attribute


Constructor Summary
CodeAttribute(java.lang.String class_name, short acc_flags)
           
 
Method Summary
 void add_code_byte_array(byte[] b)
           
 void add_code_byte(int b)
           
 void add_code_int(int i)
           
 void add_code_short(int s)
           
 void add_code(java.lang.Byte b)
           
 void add_local(java.lang.String s, Type t)
           
 void codegen(ClassFile classfile, java.io.FileOutputStream f)
           
 int get_attributes_length()
           
 java.util.Vector get_attributes_Vector()
           
 int get_code_length()
           
 java.util.Vector get_code_Vector()
           
 java.util.Vector get_exception_table_Vector()
           
 int get_indexOf_Var(java.lang.String name)
           
 java.util.Vector get_local_Vector()
           
 Type get_TypeOf_Var(java.lang.String name)
           
 void set_attributes_Vector(java.util.Vector t)
           
 void set_code_short(int s, int i)
           
 void set_code(java.lang.Byte b, int i)
           
 void set_exception_table_Vector(java.util.Vector t)
           
 
Methods inherited from class mycompiler.mybytecode.Attribute
get_attribute_name_index, set_attribute_name_index
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CodeAttribute

public CodeAttribute(java.lang.String class_name,
                     short acc_flags)
Method Detail

get_code_Vector

public java.util.Vector get_code_Vector()

get_exception_table_Vector

public java.util.Vector get_exception_table_Vector()

get_attributes_Vector

public java.util.Vector get_attributes_Vector()

get_local_Vector

public java.util.Vector get_local_Vector()

get_code_length

public int get_code_length()

add_local

public void add_local(java.lang.String s,
                      Type t)

add_code

public void add_code(java.lang.Byte b)

set_code

public void set_code(java.lang.Byte b,
                     int i)

add_code_int

public void add_code_int(int i)

add_code_short

public void add_code_short(int s)

set_code_short

public void set_code_short(int s,
                           int i)

add_code_byte

public void add_code_byte(int b)

add_code_byte_array

public void add_code_byte_array(byte[] b)

get_indexOf_Var

public int get_indexOf_Var(java.lang.String name)

get_TypeOf_Var

public Type get_TypeOf_Var(java.lang.String name)
                    throws JVMCodeException
Throws:
JVMCodeException

get_attributes_length

public int get_attributes_length()
Specified by:
get_attributes_length in class Attribute

set_exception_table_Vector

public void set_exception_table_Vector(java.util.Vector t)

set_attributes_Vector

public void set_attributes_Vector(java.util.Vector t)

codegen

public void codegen(ClassFile classfile,
                    java.io.FileOutputStream f)
             throws JVMCodeException
Specified by:
codegen in class Attribute
Throws:
JVMCodeException