Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

10
LINES

< > BotCompany Repo | #1034719 // bcel_methodToInstructions

JavaX fragment (include) [tags: use-pretranspiled]

Uses 679K of libraries. Click here for Pure Java version (5044L/28K).

!include once #1019934 // BCEL

static L<InstructionHandle> bcel_methodToInstructions(JavaClass c, org.apache.bcel.classfile.Method method) {
  S className = c.getClassName();
  var cp = new ConstantPoolGen(c.getConstantPool());
  MethodGen mg = new MethodGen(method, className, cp);
  InstructionList il = mg.getInstructionList();
  InstructionHandle[] ihs = il.getInstructionHandles();
  ret asList(ihs);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1034719
Snippet name: bcel_methodToInstructions
Eternal ID of this version: #1034719/3
Text MD5: 787b2226ca94e408e516c397ec6fc3af
Transpilation MD5: 75ad1d04545b7a41ac14a463233d76c0
Author: stefan
Category: javax / bcel
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-03-07 16:14:37
Source code size: 417 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 64 / 108
Version history: 2 change(s)
Referenced in: [show references]