Currently, JDK 1.4/1.5 is decompiled with older Jad and eclipse jode. The code generated is less readable and has many errors.
The Code decompiled from the same class file is as follows:
We can see that:
1. The Code produced by jode has the best readability, but there are class file codes that cannot be decompiled with jode;
2. The Jad code is often sorted out in large quantities;
3. For codes mixed with jode and Jad, the order of variables may be different. The name of the independent variable and jode will be better.
4. For push and pop, when left trimming, you can add independent variables and store them temporarily;
5. Java interprets expressions or function parameters from right to left. Function parameters, which are pushed at the end, are the rightmost parameters.
The equal sign assignment is performed first right and then left out of the stack.
/**
* Jode
* @ Param I
* @ Param I _1 _
* @ Param graphics
*/
Private void B (int I, int I _1 _, graphics ){
Graphics. setcolor (0 );
If (h) This). E. F = NULL)
Graphics. setcolor (6710886 );
Else {
Int TMP = 0;
If (h) This). E. F. Size () = 1 ){
Push G. C;
Push = 64;
} Else {
Push G. C;
Push = 80;
}
G. A (pop, pop, 0, 16, 16, I, I _1 _, graphics );
}
Stringbuffer = new stringbuffer ();
If (h) This). E. E> 0 ){
Graphics. setcolor (16711680 );
Stringbuffer. append ('[');
Stringbuffer. append (h) This). E. E );
Stringbuffer. append ("/u65b0/u6d88/u606f"); // new message
Stringbuffer. append (']');
}
If (h) This). F)
Graphics. setcolor (16777215 );
Stringbuffer. append (h) This). E. ());
Graphics. drawstring (A (stringbuffer. tostring (), 158), I + 16 + 1,
I _1 _ + 1, 20 );
}
/**
* Jad
* @ Param I
* @ Param J
* @ Param G1
*/
Private void B (int I, Int J, graphics G1)
{
G1.setcolor (0 );
If (E. F! = NULL) goto _ L2; else goto _ L1
_ L1:
G1.setcolor (0x666666 );
Goto _ L3
_ L2:
If (E. F. Size ()! = 1) goto _ L5; else goto _ L4
_ L4:
G. C;
76;
Goto _ L6
_ L5:
G. C;
95;
_ L6:
0;
19;
19;
I;
J;
G1;
G. ();
_ L3:
Stringbuffer = new stringbuffer ();
If (E. E> 0)
{
G1.setcolor (0xff0000 );
Stringbuffer. append ('[');
Stringbuffer. append (E. E );
Stringbuffer. append ("/u65b0/u6d88/u606f ");
Stringbuffer. append (']');
}
If (f)
G1.setcolor (0 xffffff );
Stringbuffer. append (E. ());
G1.drawstring (A (stringbuffer. tostring (), 219), I + 19 + 1, J + 1, 20 );
Return;
}
// Public final void a (Boolean bool ){
// If (bool ){
// Push this;
// Push "BD ";
//} Else {
// Push this;
// Push "AA ";
//}
// (N) Pop). d = pop;
//}
//
Public final void a (Boolean flag)
{
If (! Flag ){
This. d = "AA ";
} Else {
This. d = "BD ";
}
// If (! Flag) goto _ L2; else goto _ L1
// _ L1:
// This;
// "BD ";
// Goto _ L3
// _ L2:
// This;
// "AA ";
// _ L3:
// D;
}