Resolve class name from bytecode

后端 未结 5 550
陌清茗
陌清茗 2021-01-14 23:46

Is it possible to dig up a classes name from bytecode which is formed from the class\' source code?

The situation is this: I get a classes bytecode remotely from so

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-15 00:13

    You should be able to use javap to disassemble the byte code, if that just happens once in a while.

    For doing it at runtime: use a byte-code manipulation library like Apache's BCEL (http://jakarta.apache.org/bcel) to analyse the byte code.

提交回复
热议问题