Android 反编译乱码(一)-for、if、switch

来源:互联网 发布:刷机会清除数据吗 编辑:程序博客网 时间:2024/05/22 06:27

正版源码:

private void singleFor() {// TODO Auto-generated method stub// >>>>>>>单层forfor (int i = 0; i < size; i++) {Log.i(TAG, "for 执行内容:i=" + i);}}private void doubleFor() {// TODO Auto-generated method stub// >>>>>>>双层forfor (int i = 0; i < size; i++) {Log.i(TAG, "for第一层   第二层之前 执行内容:i=" + i);for (int j = 0; i < size; j++) {Log.i(TAG, "for第二层  执行内容:j=" + j);}Log.i(TAG, "for第一层   第二层之后 执行内容:i=" + i);}}private void forIf() {// TODO Auto-generated method stub// >>>>>>>for+ iffor (int i = 0; i < size; i++) {Log.i(TAG, "for if之前 执行内容:i=" + i);if (i == 0) {Log.i(TAG, "if i == 0");} else if (i == 1) {Log.i(TAG, "if i == 1");} else {Log.i(TAG, "if i != 0/1");}Log.i(TAG, "for if之后  执行内容:i=" + i);}}private void switch_1(int what) {// TODO Auto-generated method stub// >>>>>>>switchswitch (what) {case 0:Log.i(TAG, "int what = 0");break;case 1:Log.i(TAG, "int what = 1");break;case 2:Log.i(TAG, "int what = 2");break;default:Log.i(TAG, "int default:");break;}}private void forSwitch(int what) {// TODO Auto-generated method stub// >>>>>>>for+switchfor (int i = 0; i < size; i++) {Log.i(TAG, "for switch之前 执行内容:i=" + i);switch (what) {case 0:Log.i(TAG, "int what = 0");break;case 1:Log.i(TAG, "int what = 1");break;case 2:Log.i(TAG, "int what = 2");break;default:Log.i(TAG, "int default:");break;}Log.i(TAG, "for switch之后 执行内容:i=" + i);}}

反编译获得的源码:

private void doubleFor()  {    int i = 0;    if (i >= this.size)      return;    Log.i(this.TAG, "for第一层   第二层之前 执行内容:i=" + i);    for (int j = 0; ; j++)    {      if (i >= this.size)      {        Log.i(this.TAG, "for第一层   第二层之后 执行内容:i=" + i);        i++;        break;      }      Log.i(this.TAG, "for第二层  执行内容:j=" + j);    }  }  private void forIf()  {    int i = 0;    if (i >= this.size)      return;    Log.i(this.TAG, "for if之前 执行内容:i=" + i);    if (i == 0)      Log.i(this.TAG, "if i == 0");    while (true)    {      Log.i(this.TAG, "for if之后  执行内容:i=" + i);      i++;      break;      if (i == 1)        Log.i(this.TAG, "if i == 1");      else        Log.i(this.TAG, "if i != 0/1");    }  }  private void forSwitch(int paramInt)  {    int i = 0;    if (i >= this.size)      return;    Log.i(this.TAG, "for switch之前 执行内容:i=" + i);    switch (paramInt)    {    default:      Log.i(this.TAG, "int default:");    case 0:    case 1:    case 2:    }    while (true)    {      Log.i(this.TAG, "for switch之后 执行内容:i=" + i);      i++;      break;      Log.i(this.TAG, "int what = 0");      continue;      Log.i(this.TAG, "int what = 1");      continue;      Log.i(this.TAG, "int what = 2");    }  }  private void singleFor()  {    for (int i = 0; ; i++)    {      if (i >= this.size)        return;      Log.i(this.TAG, "for 执行内容:i=" + i);    }  }  private void switch_1(int paramInt)  {    switch (paramInt)    {    default:      Log.i(this.TAG, "int default:");      return;    case 0:      Log.i(this.TAG, "int what = 0");      return;    case 1:      Log.i(this.TAG, "int what = 1");      return;    case 2:    }    Log.i(this.TAG, "int what = 2");  }

Android学习交流群:523487222

(如果您觉得有用,欢迎加入,一起学习进步)
点击链接加入群【Android学习群】





2 0
原创粉丝点击