Class CodeData


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

      • 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 java.util.ArrayList<AttrData> attrs
        The remaining attributes of this class
      • trap_table

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

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

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

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

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

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

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

        private java.io.PrintWriter out
    • Constructor Detail

    • Method Detail

      • 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​(java.io.DataInputStream in)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • readLocVarTable

        private void readLocVarTable​(java.io.DataInputStream in)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • readTrapTable

        private void readTrapTable​(java.io.DataInputStream in)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • readStackMap

        private void readStackMap​(java.io.DataInputStream in)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • readStackMapTable

        private void readStackMapTable​(java.io.DataInputStream in)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • readTypeAnnotations

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

        public void read​(java.io.DataInputStream in,
                         int codeattrlen)
                  throws java.io.IOException
        read

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

        Throws:
        java.io.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 java.io.IOException
        print

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

        Throws:
        java.io.IOException