com.sun.tools.classfile
Class Code_attribute

java.lang.Object
  extended by com.sun.tools.classfile.Attribute
      extended by com.sun.tools.classfile.Code_attribute

public class Code_attribute
extends Attribute

See JVMS3, section 4.8.3.

This is NOT part of any API supported by Sun Microsystems. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.


Nested Class Summary
 class Code_attribute.Exception_data
           
 class Code_attribute.InvalidIndex
           
 
Nested classes/interfaces inherited from class com.sun.tools.classfile.Attribute
Attribute.Factory, Attribute.Visitor<R,P>
 
Field Summary
 Attributes attributes
           
 byte[] code
           
 int code_length
           
 Code_attribute.Exception_data[] exception_table
           
 int exception_table_langth
           
 int max_locals
           
 int max_stack
           
 
Fields inherited from class com.sun.tools.classfile.Attribute
AnnotationDefault, attribute_length, attribute_name_index, CharacterRangeTable, Code, CompilationID, ConstantValue, Deprecated, EnclosingMethod, Exceptions, InnerClasses, LineNumberTable, LocalVariableTable, LocalVariableTypeTable, Module, ModuleExportTable, ModuleMemberTable, RuntimeInvisibleAnnotations, RuntimeInvisibleParameterAnnotations, RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations, Signature, SourceDebugExtension, SourceFile, SourceID, StackMap, StackMapTable, Synthetic
 
Constructor Summary
Code_attribute(ClassReader cr, int name_index, int length)
           
 
Method Summary
<R,D> R
accept(Attribute.Visitor<R,D> visitor, D data)
           
 int getByte(int offset)
           
 int getInt(int offset)
           
 int getShort(int offset)
           
 int getUnsignedByte(int offset)
           
 int getUnsignedShort(int offset)
           
 
Methods inherited from class com.sun.tools.classfile.Attribute
getName, read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

max_stack

public final int max_stack

max_locals

public final int max_locals

code_length

public final int code_length

code

public final byte[] code

exception_table_langth

public final int exception_table_langth

exception_table

public final Code_attribute.Exception_data[] exception_table

attributes

public final Attributes attributes
Constructor Detail

Code_attribute

Code_attribute(ClassReader cr,
               int name_index,
               int length)
         throws java.io.IOException,
                ConstantPoolException
Throws:
java.io.IOException
ConstantPoolException
Method Detail

getByte

public int getByte(int offset)
            throws Code_attribute.InvalidIndex
Throws:
Code_attribute.InvalidIndex

getUnsignedByte

public int getUnsignedByte(int offset)
                    throws Code_attribute.InvalidIndex
Throws:
Code_attribute.InvalidIndex

getShort

public int getShort(int offset)
             throws Code_attribute.InvalidIndex
Throws:
Code_attribute.InvalidIndex

getUnsignedShort

public int getUnsignedShort(int offset)
                     throws Code_attribute.InvalidIndex
Throws:
Code_attribute.InvalidIndex

getInt

public int getInt(int offset)
           throws Code_attribute.InvalidIndex
Throws:
Code_attribute.InvalidIndex

accept

public <R,D> R accept(Attribute.Visitor<R,D> visitor,
                      D data)
Specified by:
accept in class Attribute