Skip to content

Instantly share code, notes, and snippets.

@tophyr
Created September 29, 2014 18:15
Show Gist options
  • Save tophyr/ca3c5bb891e2727e03c2 to your computer and use it in GitHub Desktop.
Save tophyr/ca3c5bb891e2727e03c2 to your computer and use it in GitHub Desktop.
.class public final BuildConfig
.super Object
.source "BuildConfig.java"
.field public static final BUILD_TYPE:String = "debug"
.field public static final DEBUG:Z = false
.field public static final FLAVOR:String = ""
.field public static final PACKAGE_NAME:String = "com.sarbs.tinker"
.field public static final VERSION_CODE:I = 0x1
.field public static final VERSION_NAME:String = "1.0"
.method static constructor <clinit>()V
.registers 1
.prologue
.line 7
00000000 const-string v0, "true"
00000004 invoke-static Boolean->parseBoolean(String)Z, v0
0000000A move-result v0
0000000C sput-boolean v0, BuildConfig->DEBUG:Z
00000010 return-void
.end method
.method public constructor <init>()V
.registers 1
.prologue
.line 6
00000000 invoke-direct Object-><init>()V, p0
00000006 return-void
.end method
#--------------------------------------------------------------------------------
.class public final R$attr
.super Object
.source "R.java"
.annotation system EnclosingClass
value = R
.end annotation
.annotation system InnerClass
accessFlags = 0x19
name = "attr"
.end annotation
.method public constructor <init>()V
.registers 1
.prologue
.line 11
00000000 invoke-direct Object-><init>()V, p0
00000006 return-void
.end method
#--------------------------------------------------------------------------------
.class public final R$dimen
.super Object
.source "R.java"
.annotation system EnclosingClass
value = R
.end annotation
.annotation system InnerClass
accessFlags = 0x19
name = "dimen"
.end annotation
.field public static final activity_horizontal_margin:I = 0x7F040000
.field public static final activity_vertical_margin:I = 0x7F040001
.method public constructor <init>()V
.registers 1
.prologue
.line 13
00000000 invoke-direct Object-><init>()V, p0
00000006 return-void
.end method
#--------------------------------------------------------------------------------
.class public final R$drawable
.super Object
.source "R.java"
.annotation system EnclosingClass
value = R
.end annotation
.annotation system InnerClass
accessFlags = 0x19
name = "drawable"
.end annotation
.field public static final ic_launcher:I = 0x7F020000
.method public constructor <init>()V
.registers 1
.prologue
.line 17
00000000 invoke-direct Object-><init>()V, p0
00000006 return-void
.end method
#--------------------------------------------------------------------------------
.class public final R$id
.super Object
.source "R.java"
.annotation system EnclosingClass
value = R
.end annotation
.annotation system InnerClass
accessFlags = 0x19
name = "id"
.end annotation
.field public static final button:I = 0x7F070001
.field public static final text:I = 0x7F070000
.method public constructor <init>()V
.registers 1
.prologue
.line 20
00000000 invoke-direct Object-><init>()V, p0
00000006 return-void
.end method
#--------------------------------------------------------------------------------
.class public final R$layout
.super Object
.source "R.java"
.annotation system EnclosingClass
value = R
.end annotation
.annotation system InnerClass
accessFlags = 0x19
name = "layout"
.end annotation
.field public static final activity_tinker:I = 0x7F030000
.method public constructor <init>()V
.registers 1
.prologue
.line 24
00000000 invoke-direct Object-><init>()V, p0
00000006 return-void
.end method
#--------------------------------------------------------------------------------
.class public final R$string
.super Object
.source "R.java"
.annotation system EnclosingClass
value = R
.end annotation
.annotation system InnerClass
accessFlags = 0x19
name = "string"
.end annotation
.field public static final action_settings:I = 0x7F050000
.field public static final app_name:I = 0x7F050001
.field public static final hello_world:I = 0x7F050002
.method public constructor <init>()V
.registers 1
.prologue
.line 27
00000000 invoke-direct Object-><init>()V, p0
00000006 return-void
.end method
#--------------------------------------------------------------------------------
.class public final R$style
.super Object
.source "R.java"
.annotation system EnclosingClass
value = R
.end annotation
.annotation system InnerClass
accessFlags = 0x19
name = "style"
.end annotation
.field public static final AppTheme:I = 0x7F060000
.method public constructor <init>()V
.registers 1
.prologue
.line 32
00000000 invoke-direct Object-><init>()V, p0
00000006 return-void
.end method
#--------------------------------------------------------------------------------
.class public final R
.super Object
.source "R.java"
.annotation system MemberClasses
value = {
R$style,
R$string,
R$layout,
R$id,
R$drawable,
R$dimen,
R$attr
}
.end annotation
.method public constructor <init>()V
.registers 1
.prologue
.line 10
00000000 invoke-direct Object-><init>()V, p0
.line 32
00000006 return-void
.end method
#--------------------------------------------------------------------------------
.class public Tinker
.super Activity
.source "Tinker.java"
.field private mList:List
.method public constructor <init>()V
.registers 1
.prologue
.line 11
00000000 invoke-direct Activity-><init>()V, p0
00000006 return-void
.end method
.method private iterateForEach()V
.registers 5
.prologue
.line 27
00000000 iget-object v2, p0, Tinker->mList:List
00000004 invoke-interface List->iterator()Iterator, v2
0000000A move-result-object v0
:C
.local v0, i$:Ljava/util/Iterator;
0000000C invoke-interface Iterator->hasNext()Z, v0
00000012 move-result v2
00000014 if-eqz v2, :34
:18
00000018 invoke-interface Iterator->next()Object, v0
0000001E move-result-object v1
.line 28
.local v1, ob:Ljava/lang/Object;
00000020 const-string v2, "tag"
00000024 invoke-virtual Object->toString()String, v1
0000002A move-result-object v3
0000002C invoke-static Log->w(String, String)I, v2, v3
00000032 goto :C
:34
.line 30
00000034 return-void
.end method
.method private iterateIterator()V
.registers 5
.prologue
.line 33
00000000 iget-object v2, p0, Tinker->mList:List
00000004 invoke-interface List->iterator()Iterator, v2
0000000A move-result-object v0
:C
.line 34
.local v0, it:Ljava/util/Iterator;
0000000C invoke-interface Iterator->hasNext()Z, v0
00000012 move-result v2
00000014 if-eqz v2, :34
:18
.line 35
00000018 invoke-interface Iterator->next()Object, v0
0000001E move-result-object v1
.line 36
.local v1, ob:Ljava/lang/Object;
00000020 const-string v2, "tag"
00000024 invoke-virtual Object->toString()String, v1
0000002A move-result-object v3
0000002C invoke-static Log->w(String, String)I, v2, v3
00000032 goto :C
:34
.line 38
00000034 return-void
.end method
.method protected onCreate(Bundle)V
.registers 4
.param p1, "savedInstanceState"
.prologue
.line 17
00000000 invoke-super Activity->onCreate(Bundle)V, p0, p1
.line 18
00000006 const/high16 v0, 0x7F030000 # R.layout.activity_tinker
0000000A invoke-virtual Tinker->setContentView(I)V, p0, v0
.line 20
00000010 const/16 v0, 0x0014
00000014 new-instance v1, Object
00000018 invoke-direct Object-><init>()V, v1
0000001E invoke-static Collections->nCopies(I, Object)List, v0, v1
00000024 move-result-object v0
00000026 iput-object v0, p0, Tinker->mList:List
.line 22
0000002A invoke-direct Tinker->iterateForEach()V, p0
.line 23
00000030 invoke-direct Tinker->iterateIterator()V, p0
.line 24
00000036 return-void
.end method
#--------------------------------------------------------------------------------
package com.sarbs.tinker;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
public class Tinker extends Activity {
private List mList;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_tinker);
mList = Collections.nCopies(20, new Object());
iterateForEach();
iterateIterator();
}
private void iterateForEach() {
for (Object ob : mList) {
Log.w("tag", ob.toString());
}
}
private void iterateIterator() {
Iterator it = mList.iterator();
while (it.hasNext()) {
Object ob = it.next();
Log.w("tag", ob.toString());
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment