在IntelliJ中查看javap -c输出

时间:2018-03-08 18:00:57

标签: java intellij-idea bytecode javap

我想以命令mysql> select UpdateXML(CONTENT, '//script', '') as WITHOUT_SCRIPT from XML\G *************************** 1. row *************************** WITHOUT_SCRIPT: <p style="text-align: justify">The Birlea Sophia cream metal bed frame has classic styling with delightful heart details on the head and foot ends and a smooth cream finish.</p> <p style="text-align: justify">This&nbsp;bed frame is&nbsp;sturdy in construction and has a sprung slatted base to give any style of mattress the ideal support it needs. The Sophia is also available in a <a href="http://www.myshop.co.uk/Birlea-Sophia-Single-Pink-Metal-Bed-Frame-p1402.html">pretty pink finish</a>.</p> <p style="text-align: justify">The Sophia from Birlea is a pretty girl's bed frame and perfect for brightening up any bedroom, so <strong><span style="color: #df0000">BUY NOW.</span></strong></p> <p style="text-align: justify"><b style="text-align: start;">Please note: Bed frames are self assembly and priced without a mattress.</b></p> 1 row in set (0.00 sec) 输出它的方式查看Java字节码,而不是像“View Bytecode插件”那样。有没有办法实现这个目标?

示例:此方法

javap -c

转换为

public void increment() {
    c++;
}

使用 public void increment(); Code: 0: aload_0 1: dup 2: getfield #2 // Field c:I 5: iconst_1 6: iadd 7: putfield #2 // Field c:I 10: return 命令,但在IntelliJ的本机字节码查看器中,它看起来像这样:

javap -c

哪个更复杂,更难阅读。我想查看第一个,而不必先编译整个项目,然后将 // access flags 0x1 public increment()V L0 LINENUMBER 14 L0 ALOAD 0 DUP GETFIELD ethz/ch/pp/assignment3/counters/SequentialCounter.c : I ICONST_1 IADD PUTFIELD ethz/ch/pp/assignment3/counters/SequentialCounter.c : I L1 LINENUMBER 15 L1 RETURN L2 LOCALVARIABLE this Lethz/ch/pp/assignment3/counters/SequentialCounter; L0 L2 0 MAXSTACK = 3 MAXLOCALS = 1 归档,然后仅在一两个类上执行.class。谢谢你的帮助。

0 个答案:

没有答案