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

18
LINES

< > BotCompany Repo | #1012227 // Print Smart Bot's main class's constant pool using BCEL (OK)

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Uses 1311K of libraries. Click here for Pure Java version (1677L/11K).

!7

p {
  File classFile = prepareProgramFile("main.class");
  Class prog = hotwire(#1010745);
  copyMainClassFileFromHotwiredProgram(prog, classFile);
  JavaClass c = classToBCEL(prog);
  
  //pnl(c.getMethods();
  for (int i = 0; i < c.getConstantPool().getLength(); i++)
    print((i+1) + ". " + c.getConstantPool().getConstant(i));
  
  print();
  print("main.class size: " + fileSize(classFile));
  print("Constant pool size: " + c.getConstantPool().getLength());
  print("Fields: " + l(c.getFields()));
  print("Methods: " + l(c.getMethods()));
}

Author comment

Began life as a copy of #1004069

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): afbdgwpgxusd, aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1012227
Snippet name: Print Smart Bot's main class's constant pool using BCEL (OK)
Eternal ID of this version: #1012227/10
Text MD5: aaa96551c21c8cb6e0752a71ce9ffb2f
Transpilation MD5: 462ddb1c822d537cfcf2ac4bfb02caa6
Author: stefan
Category: javax / byte code
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-11-24 13:54:30
Source code size: 569 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 483 / 1031
Version history: 9 change(s)
Referenced in: [show references]