6,一个continue对应一个back原则(switch while结构)
在这种形式中,一个contiune一定是对应一个back,但一个case不一定只对应一个contiune,也有一个case对应两个或多个contiune(即back).
如以下反编译后的代码:
- switch (getId())
- {
- case 2131034119:
- case 2131034120:
- case 2131034121:
- case 2131034122:
- case 2131034123:
- case 2131034124:
- case 2131034125:
- case 2131034126:
- case 2131034127:
- case 2131034128:
- default:
- case 2131034129:
- case 2131034130:
- case 2131034131:
- case 2131034132:
- case 2131034133:
- case 2131034134:
- case 2131034117:
- case 2131034118:
- }
- while (true)
- {
- return;
- int i = paramVerticalSeekBar.getProgress() * 14;
- int j = paramVerticalSeekBar.getMax();
- int k = i / j;
- if (APPActivity.access$200(this.this$0) == k)
- continue;
- int l = APPActivity.access$202(this.this$0, k);
- int i1 = APPActivity.access$200(this.this$0);
- continue;
- int i3 = paramVerticalSeekBar.getProgress() * 14;
- int i4 = paramVerticalSeekBar.getMax();
- k = i3 / i4;
- if (APPActivity.access$400(this.this$0) == k)
- continue;
- int i5 = APPActivity.access$402(this.this$0, k);
- EQ localEQ2 = APPActivity.access$1400(this.this$0);
- int i6 = APPActivity.access$400(this.this$0);
- int i7 = localEQ2.sendCommand(257, 2, i6);
- continue;
- int i8 = paramVerticalSeekBar.getProgress() * 14;
- int i9 = paramVerticalSeekBar.getMax();
- k = i8 / i9;
- if (APPActivity.access$500(this.this$0) == k)
- continue;
- int i10 = APPActivity.access$502(this.this$0, k);
- int i11 = APPActivity.access$500(this.this$0);
- continue;
- int i13 = paramVerticalSeekBar.getProgress() * 3;
- int i14 = paramVerticalSeekBar.getMax();
- k = i13 / i14;
- if (APPActivity.access$600(this.this$0) == k)
- continue;
- int i15 = APPActivity.access$602(this.this$0, k);
- EQ localEQ4 = APPActivity.access$1400(this.this$0);
- int i16 = APPActivity.access$600(this.this$0);
- int i17 = localEQ4.sendCommand(257, 8, i16);
- continue;
- int i18 = paramVerticalSeekBar.getProgress() * 3;
- int i19 = paramVerticalSeekBar.getMax();
- k = i18 / i19;
- if (EQActivity.access$700(this.this$0) == k)
- continue;
- int i20 = APPActivity.access$702(this.this$0, k);
- EQ localEQ5 = APPActivity.access$1400(this.this$0);
- int i21 = APPActivity.access$700(this.this$0);
- continue;
- int i23 = paramVerticalSeekBar.getProgress() * 3;
- int i24 = paramVerticalSeekBar.getMax();
- k = i23 / i24;
- if (APPActivity.access$800(this.this$0) == k)
- continue;
- int i25 = APPActivity.access$802(this.this$0, k);
- EQ localEQ6 = APPActivity.access$1400(this.this$0);
- int i26 = APPActivity.access$800(this.this$0);
- continue;
- int i28 = paramVerticalSeekBar.getProgress() * 14;
- int i29 = paramVerticalSeekBar.getMax();
- k = i28 / i29;
- if (APPActivity.access$900(this.this$0) == k)
- continue;
- int i30 = APPActivity.access$902(this.this$0, k);
- EQ localEQ7 = APPActivity.access$1400(this.this$0);
- int i31 = APPActivityvity.access$900(this.this$0);
- continue;
- int i33 = paramVerticalSeekBar.getProgress() * 3;
- int i34 = paramVerticalSeekBar.getMax();
- k = i33 / i34;
- if (APPActivity.access$1000(this.this$0) == k)
- continue;
- int i35 = APPActivity.access$1002(this.this$0, k);
- EQ localEQ8 = APPActivity.access$1400(this.this$0);
- int i36 = APPActivity.access$1000(this.this$0);
- }
分析代码:
1),上遍已对这种形式有讲过,一个continue对应一个case,但是你数一数会发现,对不上号,明显case多于contiune,原因是什么呢?其实switch里的default对应的是while中的return,在switch中default以上的case是用不着,是没有用的。
2),如果default上面的case没有用,聪明的你可以可能会问两个问题?
A,default上面的case没有用,为什么还会有呢?原因很简单,因为反编译器也不是全智能的总会有不对的(但是执行逻辑是不会有错),呵呵真正的原因当然不会是这样,你可以自己去分析一下,从整个程序分析就可以得出结论来。
B,那按一个continue对应一个back的原则不是有错吗? 当然没有。一个continue还是对应一个back, 聪明的你一定看懂了,每两个continue中间还有一个if语句,对,没错,你理解是对的,就是在这中间满足条件时就会back,所以就会有一个continue与之相对应。
所这里每个if + continue + continue的形式对应一个case。
3),恢复原代码结构就变的简单,这里就再敖叙了。
原文:http://blog.csdn.net/ordinaryjoe/article/details/8834059