您的位置:首页 > 编程语言 > Java开发

eclipse插件

2016-05-08 15:40 190 查看
Bytecode Visualizer:分析调试 Java 字节码,直接去官网找,然后有个install now按钮拖到eclipse空间就会帮你下载!

下面是用Bytecode Visualizer查看的字节码信息:

/* ******************************************** */
/* Generated by Dr. Garbage Bytecode Visualizer */
/* http://www.drgarbage.com                     */
/* Version: 4.5.0.201508311741                  */
/* Class retrieved from: Filesystem             */
/* Retrieved on: 2016-05-08 15:39:48.271        */
/* ******************************************** */

/* class file format version 52.0 (java 1.8) */
package com.xll.test;
public class Test {
/*                               Constant Pool                                */
/* -------+----------------------+------------------------------------------- */
/*  index | tag                  | info                                       */
/* -------+----------------------+------------------------------------------- */
/*      1 | CONSTANT_Class       | name_index=2                               */
/*      2 | CONSTANT_Utf8        | length=17; bytes="com/xll/test/Test"       */
/*      3 | CONSTANT_Class       | name_index=4                               */
/*      4 | CONSTANT_Utf8        | length=16; bytes="java/lang/Object"        */
/*      5 | CONSTANT_Utf8        | length=6; bytes="<init>"                   */
/*      6 | CONSTANT_Utf8        | length=3; bytes="()V"                      */
/*      7 | CONSTANT_Utf8        | length=4; bytes="Code"                     */
/*      8 | CONSTANT_Methodref   | class_index=3; name_and_type_index=9       */
/*      9 | CONSTANT_NameAndType | name_index=5; descriptor_index=6           */
/*     10 | CONSTANT_Fieldref    | class_index=11; name_and_type_index=13     */
/*     11 | CONSTANT_Class       | name_index=12                              */
/*     12 | CONSTANT_Utf8        | length=16; bytes="java/lang/System"        */
/*     13 | CONSTANT_NameAndType | name_index=14; descriptor_index=15         */
/*     14 | CONSTANT_Utf8        | length=3; bytes="out"                      */
/*     15 | CONSTANT_Utf8        | length=21; bytes="Ljava/io/PrintStream;"   */
/*     16 | CONSTANT_String      | string_index=17                            */
/*     17 | CONSTANT_Utf8        | length=5; bytes="nihao"                    */
/*     18 | CONSTANT_Methodref   | class_index=19; name_and_type_index=21     */
/*     19 | CONSTANT_Class       | name_index=20                              */
/*     20 | CONSTANT_Utf8        | length=19; bytes="java/io/PrintStream"     */
/*     21 | CONSTANT_NameAndType | name_index=22; descriptor_index=23         */
/*     22 | CONSTANT_Utf8        | length=7; bytes="println"                  */
/*     23 | CONSTANT_Utf8        | length=21; bytes="(Ljava/lang/String;)V"   */
/*     24 | CONSTANT_Utf8        | length=15; bytes="LineNumberTable"         */
/*     25 | CONSTANT_Utf8        | length=18; bytes="LocalVariableTable"      */
/*     26 | CONSTANT_Utf8        | length=4; bytes="this"                     */
/*     27 | CONSTANT_Utf8        | length=19; bytes="Lcom/xll/test/Test;"     */
/*     28 | CONSTANT_Utf8        | length=4; bytes="main"                     */
/*     29 | CONSTANT_Utf8        | length=22; bytes="([Ljava/lang/String;)V"  */
/*     30 | CONSTANT_Methodref   | class_index=1; name_and_type_index=9       */
/*     31 | CONSTANT_Utf8        | length=4; bytes="args"                     */
/*     32 | CONSTANT_Utf8        | length=19; bytes="[Ljava/lang/String;"     */
/*     33 | CONSTANT_Utf8        | length=10; bytes="SourceFile"              */
/*     34 | CONSTANT_Utf8        | length=9; bytes="Test.java"                */
/* -------+----------------------+------------------------------------------- */
/* compiled from Test.java */
public Test() {
/* L4 */
0 aload_0;                /* this */
1 invokespecial 8;        /* java.lang.Object() */
/* L5 */
4 getstatic 10;           /* java.lang.System.out */
7 ldc 16;                 /* "nihao" */
9 invokevirtual 18;       /* void println(java.lang.String arg0) */
/* L6 */
12 return;
/*     LineNumberTable      */
/* ----------+------------- */
/*  start_pc | line_number  */
/* ----------+------------- */
/*         0 |           4  */
/*         4 |           5  */
/*        12 |           6  */
/* ----------+------------- */
/*                     LocalVariableTable                      */
/* -------+----------+--------+------------+------------------ */
/*  index | start_pc | length | name_index | descriptor_index  */
/* -------+----------+--------+------------+------------------ */
/*      0 |        0 |     13 |         26 |               27  */
/* -------+----------+--------+------------+------------------ */
/* ExceptionTable (empty) */
/* max_stack: 2 max_locals: 1 */
}
public static void main(java.lang.String[] args) {
/* L9 */
0 new 1;
3 invokespecial 30;       /* com.xll.test.Test() */
/* L10 */
6 return;
/*     LineNumberTable      */
/* ----------+------------- */
/*  start_pc | line_number  */
/* ----------+------------- */
/*         0 |           9  */
/*         6 |          10  */
/* ----------+------------- */
/*                     LocalVariableTable                      */
/* -------+----------+--------+------------+------------------ */
/*  index | start_pc | length | name_index | descriptor_index  */
/* -------+----------+--------+------------+------------------ */
/*      0 |        0 |      7 |         31 |               32  */
/* -------+----------+--------+------------+------------------ */
/* ExceptionTable (empty) */
/* max_stack: 1 max_locals: 1 */
}
}


源代码是:

package com.xll.test;
public class Test {
public Test() {
System.out.println("nihao");
}
public static void main(String[] args) {
new Test();
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: