现在的位置: 首页 > 综合 > 正文

【原创】assert 反编译代码解释

2012年03月23日 ⁄ 综合 ⁄ 共 973字 ⁄ 字号 评论关闭

源代码:

 package test.ja.TestHotPursuit;

import android.app.Activity;
import android.os.Bundle;

public class TestHotPursuitActivity extends Activity {
    /** Called when the activity is first created. */
    String testStr = "";
    static boolean isTrue = true;
    @Override
    public void onCreate(Bundle savedInstanceState) {
         assert (testStr != "");
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
}

 

反编译:

package test.ja.TestHotPursuit;

import android.app.Activity;
import android.os.Bundle;

public class TestHotPursuitActivity extends Activity
{
  static boolean isTrue;
  String testStr = "";

  static
  {
    if (!TestHotPursuitActivity.class.desiredAssertionStatus());
    for (boolean bool = true; ; bool = false)
    {
      $assertionsDisabled = bool;
      isTrue = true;
      return;
    }
  }

  public void onCreate(Bundle paramBundle)
  {
    assert (this.testStr != "");
    super.onCreate(paramBundle);
    setContentView(2130903040);
  }

 

 

 

抱歉!评论已关闭.