My favorites | Sign in
Project Home Downloads Wiki Issues Source
Repository:
Checkout   Browse   Changes   Clones  
Changes to /demos/jvm_format_5.py
deacc25bd346 vs. a7887d5d8446 Compare: vs.  Format:
Revision a7887d5d8446
Go to: 
Project members, sign in to write a code review
/demos/jvm_format_5.py   deacc25bd346 /demos/jvm_format_5.py   a7887d5d8446
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 import sys 3 import sys
4 4
5 PATH_INSTALL = "./" 5 PATH_INSTALL = "./"
6 sys.path.append(PATH_INSTALL + "/core") 6 sys.path.append(PATH_INSTALL + "/core")
7 sys.path.append(PATH_INSTALL + "/core/bytecodes") 7 sys.path.append(PATH_INSTALL + "/core/bytecodes")
8 sys.path.append(PATH_INSTALL + "/core/analysis") 8 sys.path.append(PATH_INSTALL + "/core/analysis")
9 9
10 import jvm, analysis 10 import jvm, analysis
11 11
12 TEST = "./examples/java/test/orig/Test1.class" 12 TEST = "./examples/java/test/orig/Test1.class"
13 13
14 j = jvm.JVMFormat( open(TEST).read() ) 14 j = jvm.JVMFormat( open(TEST).read() )
15 x = analysis.VM_BCA( j ) 15 x = analysis.VM_BCA( j )
16 16
17 # SHOW CLASS (verbose and pretty) 17 # SHOW CLASS (verbose and pretty)
18 #j.pretty_show( x ) 18 #j.pretty_show( x )
19 19
20 # SHOW METHODS 20 # SHOW METHODS
21 for i in j.get_methods() : 21 for i in j.get_methods() :
22 print i 22 print i
23 i.pretty_show( x ) 23 i.pretty_show( x )
Powered by Google Project Hosting