Java decompilation code analysis (1): java decompilation code analysis
This article analyzes how to read such decompiled files.
Assignment
Node node; Node node1 = _$3.getChildNodes().item(0); node1; node1; JVM INSTR swap ; node; getChildNodes(); 0; item(); getChildNodes(); 0; item(); getNodeValue(); String s; s;
Original statement:
Node node;Node node1 = currDocument.getChildNodes().item(0);node = node1;String s = node.getChildNodes().item(0).getChildNodes().item(0).getNodeValue();
// Value assignment statement // jvm instr swap;
Create an object without Parameters
JVM INSTR new #244 <Class CrossTable>; JVM INSTR dup ; JVM INSTR swap ; CrossTable(); CrossTable crosstable; crosstable;
CrossTable crosstable = new CrossTable();
Object created with Parameters
JVM INSTR new #262 <Class StringBuffer>; JVM INSTR dup ; JVM INSTR swap ; String.valueOf(s2); StringBuffer(); s.substring(j, i); append(); s6; append(); toString(); s2;
s2 = (new StringBuffer(String.valueOf(s2))).append(s.substring(j, i)).append(s6).toString();//s2 += s.substring(j, i) + s6;
For Loop
int k = 0;goto _L4_L8: ... k++;_L4: if(k < as.length) goto _L8; else goto _L7
for(int k=0;k < as.length;k++) { ... }
While Loop
String s1 = ""; goto _L1_L3: JVM INSTR new #262 <Class StringBuffer>; JVM INSTR dup ; JVM INSTR swap ; String.valueOf(s1); StringBuffer(); _$2(resultset, s, l); append(); toString(); s1;_L1: if(resultset.next()) goto _L3; else goto _L2
String s1 = ""; while(resultset.next()) { s1 = s1 + resultSetToString(resultset, s, l); }
I am the dividing line of tiantiao