Class CodeData

java.lang.Object
org.openjdk.asmtools.jdis.Indenter
org.openjdk.asmtools.jdis.CodeData

public class CodeData extends Indenter
Code data for a code attribute in method members in a class of the Java Disassembler
  • Field Details

    • code

      protected byte[] code
      Raw byte array for the byte codes
    • max_stack

      protected int max_stack
      Limit for the stack size
    • max_locals

      protected int max_locals
      Limit for the number of local vars
    • attrs

      protected ArrayList<AttrData> attrs
      The remaining attributes of this class
    • cls

      protected ClassData cls
    • meth

      protected MethodData meth
    • trap_table

      private ArrayList<TrapData> trap_table
      (parsed) Trap table, describes exceptions caught
    • lin_num_tb

      private ArrayList<CodeData.LineNumData> lin_num_tb
      (parsed) Line Number table, describes source lines associated with ByteCode indexes
    • loc_var_tb

      private ArrayList<CodeData.LocVarData> loc_var_tb
      (parsed) Local Variable table, describes variable scopes associated with ByteCode indexes
    • stack_map

      private ArrayList<StackMapData> stack_map
      (parsed) stack map table, describes compiler hints for stack rep, associated with ByteCode indexes
    • visibleTypeAnnotations

      private ArrayList<TypeAnnotationData> visibleTypeAnnotations
      The visible type annotations for this method
    • invisibleTypeAnnotations

      private ArrayList<TypeAnnotationData> invisibleTypeAnnotations
      The invisible type annotations for this method
    • iattrs

      private HashMap<Integer,iAtt> iattrs
      (parsed) reversed bytecode index hash, associates labels with ByteCode indexes
    • out

      private PrintWriter out
  • Constructor Details

  • Method Details

    • align

      private static int align(int n)
    • getbyte

      private int getbyte(int pc)
    • getUbyte

      private int getUbyte(int pc)
    • getShort

      private int getShort(int pc)
    • getUShort

      private int getUShort(int pc)
    • getInt

      private int getInt(int pc)
    • get_iAtt

      protected iAtt get_iAtt(int pc)
    • readLineNumTable

      private void readLineNumTable(DataInputStream in) throws IOException
      Throws:
      IOException
    • readLocVarTable

      private void readLocVarTable(DataInputStream in) throws IOException
      Throws:
      IOException
    • readTrapTable

      private void readTrapTable(DataInputStream in) throws IOException
      Throws:
      IOException
    • readStackMap

      private void readStackMap(DataInputStream in) throws IOException
      Throws:
      IOException
    • readStackMapTable

      private void readStackMapTable(DataInputStream in) throws IOException
      Throws:
      IOException
    • readTypeAnnotations

      private void readTypeAnnotations(DataInputStream in, boolean isInvisible) throws IOException
      Throws:
      IOException
    • read

      public void read(DataInputStream in, int codeattrlen) throws IOException
      read

      read and resolve the code attribute data called from MethodData. precondition: NumFields has already been read from the stream.

      Throws:
      IOException
    • checkForLabelRef

      private int checkForLabelRef(int pc)
    • loadLabelTable

      private void loadLabelTable()
    • loadLineNumTable

      private void loadLineNumTable()
    • loadStackMap

      private void loadStackMap()
    • loadLocVarTable

      private void loadLocVarTable()
    • loadTrapTable

      private void loadTrapTable()
    • PrintConstant

      private void PrintConstant(int cpx)
    • PrintCommentedConstant

      private void PrintCommentedConstant(int cpx)
    • printInstr

      private int printInstr(int pc)
    • print

      public void print() throws IOException
      print

      prints the code data to the current output stream. called from MethodData.

      Throws:
      IOException