GitHub - tinylcy/ClassAnalyzer: A Java Class File Disassembler
Yet another Java class file disassembler.
The purpose of ClassAnalyzer is to help me understand Java class file thoroughly.
magic = cafebabe minorVersion = 0 majorVersion = 49 constantPoolCount = 48 cpInfo[1] = ConstantMethodRefInfo{classIndex=8, nameAndTypeIndex=31} cpInfo[2] = ConstantFieldRefInfo{classIndex=5, nameAndTypeIndex=32} cpInfo[3] = ConstantClassInfo{index=33} cpInfo[4] = ConstantFieldRefInfo{classIndex=34, nameAndTypeIndex=35} cpInfo[5] = ConstantClassInfo{index=36} cpInfo[6] = ConstantClassInfo{index=37} cpInfo[7] = ConstantMethodRefInfo{classIndex=38, nameAndTypeIndex=39} cpInfo[8] = ConstantClassInfo{index=40} cpInfo[9] = ConstantClassInfo{index=41} cpInfo[10] = ConstantUtf8Info{bytesValue='TAG'} cpInfo[11] = ConstantUtf8Info{bytesValue='Ljava/lang/String;'} cpInfo[12] = ConstantUtf8Info{bytesValue='ConstantValue'} cpInfo[13] = ConstantUtf8Info{bytesValue='num'} cpInfo[14] = ConstantUtf8Info{bytesValue='I'} cpInfo[15] = ConstantUtf8Info{bytesValue='<init>'} cpInfo[16] = ConstantUtf8Info{bytesValue='()V'} cpInfo[17] = ConstantUtf8Info{bytesValue='Code'} cpInfo[18] = ConstantUtf8Info{bytesValue='LineNumberTable'} cpInfo[19] = ConstantUtf8Info{bytesValue='LocalVariableTable'} cpInfo[20] = ConstantUtf8Info{bytesValue='this'} cpInfo[21] = ConstantUtf8Info{bytesValue='Lorg/tinylcy/TestClass;'} cpInfo[22] = ConstantUtf8Info{bytesValue='inc'} cpInfo[23] = ConstantUtf8Info{bytesValue='exception'} cpInfo[24] = ConstantUtf8Info{bytesValue='()I'} cpInfo[25] = ConstantUtf8Info{bytesValue='x'} cpInfo[26] = ConstantUtf8Info{bytesValue='e'} cpInfo[27] = ConstantUtf8Info{bytesValue='Ljava/lang/Exception;'} cpInfo[28] = ConstantUtf8Info{bytesValue='showTag'} cpInfo[29] = ConstantUtf8Info{bytesValue='SourceFile'} cpInfo[30] = ConstantUtf8Info{bytesValue='TestClass.java'} cpInfo[31] = ConstantNameAndTypeInfo{nameIndex=15, descriptorIndex=16} cpInfo[32] = ConstantNameAndTypeInfo{nameIndex=13, descriptorIndex=14} cpInfo[33] = ConstantUtf8Info{bytesValue='java/lang/Exception'} cpInfo[34] = ConstantClassInfo{index=42} cpInfo[35] = ConstantNameAndTypeInfo{nameIndex=43, descriptorIndex=44} cpInfo[36] = ConstantUtf8Info{bytesValue='org/tinylcy/TestClass'} cpInfo[37] = ConstantUtf8Info{bytesValue='tinylcy'} cpInfo[38] = ConstantClassInfo{index=45} cpInfo[39] = ConstantNameAndTypeInfo{nameIndex=46, descriptorIndex=47} cpInfo[40] = ConstantUtf8Info{bytesValue='java/lang/Object'} cpInfo[41] = ConstantUtf8Info{bytesValue='java/lang/Cloneable'} cpInfo[42] = ConstantUtf8Info{bytesValue='java/lang/System'} cpInfo[43] = ConstantUtf8Info{bytesValue='out'} cpInfo[44] = ConstantUtf8Info{bytesValue='Ljava/io/PrintStream;'} cpInfo[45] = ConstantUtf8Info{bytesValue='java/io/PrintStream'} cpInfo[46] = ConstantUtf8Info{bytesValue='println'} cpInfo[47] = ConstantUtf8Info{bytesValue='(Ljava/lang/String;)V'} accessFlags = 21, public super thisClass = 5, this class name = org/tinylcy/TestClass superClass = 8, super class name = java/lang/Object interfacesCount = 1 interfaces[0] = 9, interface name = java/lang/Cloneable fieldsCount = 2 fields[0] = FieldInfo{accessFlags=25: public static final , nameIndex=10 [name = TAG], descriptorIndex=11 [descriptor = Ljava/lang/String;], attributesCount=1, attributes=[]} fields[1] = FieldInfo{accessFlags=2: private , nameIndex=13 [name = num], descriptorIndex=14 [descriptor = I], attributesCount=0, attributes=[]} methodsCount = 4 methods[0] = MethodInfo{accessFlags=1: public , nameIndex=15 [name = <init>], descriptorIndex=16 [descriptor = ()V], attributesCount=1, attributes=[Code{attributeNameIndex=17 [attribute name = Code], attributeLength=47, maxStack=1, maxLocals=1, codeLength=5, code=[42, -73, 0, 1, -79], exceptionTableLength=0, exceptionTable=[], attributesCount=2, attributes=[LineNumberTable{attributeNameIndex=18 [attribute name = LineNumberTable], attributeLength=6, lineNumberTableLength=1, lineNumberTable=[LineNumberInfo{startPc=0, lineNumber=6}]}, LocalVariableTable{attributeNameIndex=19 [attribute name = LocalVariableTable], attributeLength=12, localVariableTableLength=1}]}]} methods[1] = MethodInfo{accessFlags=1: public , nameIndex=22 [name = inc], descriptorIndex=16 [descriptor = ()V], attributesCount=1, attributes=[Code{attributeNameIndex=17 [attribute name = Code], attributeLength=57, maxStack=3, maxLocals=1, codeLength=11, code=[42, 89, -76, 0, 2, 4, 96, -75, 0, 2, -79], exceptionTableLength=0, exceptionTable=[], attributesCount=2, attributes=[LineNumberTable{attributeNameIndex=18 [attribute name = LineNumberTable], attributeLength=10, lineNumberTableLength=2, lineNumberTable=[LineNumberInfo{startPc=0, lineNumber=12}, LineNumberInfo{startPc=10, lineNumber=13}]}, LocalVariableTable{attributeNameIndex=19 [attribute name = LocalVariableTable], attributeLength=12, localVariableTableLength=1}]}]} methods[2] = MethodInfo{accessFlags=1: public , nameIndex=23 [name = exception], descriptorIndex=24 [descriptor = ()I], attributesCount=1, attributes=[Code{attributeNameIndex=17 [attribute name = Code], attributeLength=174, maxStack=1, maxLocals=5, codeLength=24, code=[4, 60, 27, 61, 6, 60, 28, -84, 77, 5, 60, 27, 62, 6, 60, 29, -84, 58, 4, 6, 60, 25, 4, -65], exceptionTableLength=4, exceptionTable=[ExceptionInfo{startPc=0, endPc=4, handlerPc=8, catchType=3}, ExceptionInfo{startPc=0, endPc=4, handlerPc=17, catchType=0}, ExceptionInfo{startPc=8, endPc=13, handlerPc=17, catchType=0}, ExceptionInfo{startPc=17, endPc=19, handlerPc=17, catchType=0}], attributesCount=2, attributes=[LineNumberTable{attributeNameIndex=18 [attribute name = LineNumberTable], attributeLength=42, lineNumberTableLength=10, lineNumberTable=[LineNumberInfo{startPc=0, lineNumber=18}, LineNumberInfo{startPc=2, lineNumber=19}, LineNumberInfo{startPc=4, lineNumber=24}, LineNumberInfo{startPc=6, lineNumber=19}, LineNumberInfo{startPc=8, lineNumber=20}, LineNumberInfo{startPc=9, lineNumber=21}, LineNumberInfo{startPc=11, lineNumber=22}, LineNumberInfo{startPc=13, lineNumber=24}, LineNumberInfo{startPc=15, lineNumber=22}, LineNumberInfo{startPc=17, lineNumber=24}]}, LocalVariableTable{attributeNameIndex=19 [attribute name = LocalVariableTable], attributeLength=52, localVariableTableLength=5}]}]} methods[3] = MethodInfo{accessFlags=9: public static , nameIndex=28 [name = showTag], descriptorIndex=16 [descriptor = ()V], attributesCount=1, attributes=[Code{attributeNameIndex=17 [attribute name = Code], attributeLength=37, maxStack=2, maxLocals=0, codeLength=9, code=[-78, 0, 4, 18, 6, -74, 0, 7, -79], exceptionTableLength=0, exceptionTable=[], attributesCount=1, attributes=[LineNumberTable{attributeNameIndex=18 [attribute name = LineNumberTable], attributeLength=10, lineNumberTableLength=2, lineNumberTable=[LineNumberInfo{startPc=0, lineNumber=29}, LineNumberInfo{startPc=8, lineNumber=30}]}]}]} attributesCount = 1 attributes[0] = SourceFile{attributeNameIndex=29 [attribute name = SourceFile], attributeLength=2, sourceFileIndex=30}