AsyncExecutor.smali
.class public Lorg/greenrobot/eventbus/util/AsyncExecutor;
.super Ljava/lang/Object;
.source "AsyncExecutor.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lorg/greenrobot/eventbus/util/AsyncExecutor$RunnableEx;,
Lorg/greenrobot/eventbus/util/AsyncExecutor$Builder;
}
.end annotation
# instance fields
.field private final eventBus:Lorg/greenrobot/eventbus/EventBus;
.field private final failureEventConstructor:Ljava/lang/reflect/Constructor;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/reflect/Constructor<",
"*>;"
}
.end annotation
.end field
.field private final scope:Ljava/lang/Object;
.field private final threadPool:Ljava/util/concurrent/Executor;
# direct methods
.method private constructor <init>(Ljava/util/concurrent/Executor;Lorg/greenrobot/eventbus/EventBus;Ljava/lang/Class;Ljava/lang/Object;)V
.registers 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/concurrent/Executor;",
"Lorg/greenrobot/eventbus/EventBus;",
"Ljava/lang/Class<",
"*>;",
"Ljava/lang/Object;",
")V"
}
.end annotation
.line 98
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 99
iput-object p1, p0, Lorg/greenrobot/eventbus/util/AsyncExecutor;->threadPool:Ljava/util/concurrent/Executor;
.line 100
iput-object p2, p0, Lorg/greenrobot/eventbus/util/AsyncExecutor;->eventBus:Lorg/greenrobot/eventbus/EventBus;
.line 101
iput-object p4, p0, Lorg/greenrobot/eventbus/util/AsyncExecutor;->scope:Ljava/lang/Object;
const/4 p1, 0x1
:try_start_a
new-array p1, p1, [Ljava/lang/Class;
const/4 p2, 0x0
.line 103
const-class p4, Ljava/lang/Throwable;
aput-object p4, p1, p2
invoke-virtual {p3, p1}, Ljava/lang/Class;->getConstructor([Ljava/lang/Class;)Ljava/lang/reflect/Constructor;
move-result-object p1
iput-object p1, p0, Lorg/greenrobot/eventbus/util/AsyncExecutor;->failureEventConstructor:Ljava/lang/reflect/Constructor;
:try_end_17
.catch Ljava/lang/NoSuchMethodException; {:try_start_a .. :try_end_17} :catch_18
return-void
:catch_18
move-exception p1
.line 105
new-instance p2, Ljava/lang/RuntimeException;
const-string p3, "Failure event class must have a constructor with one parameter of type Throwable"
invoke-direct {p2, p3, p1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw p2
.end method
.method synthetic constructor <init>(Ljava/util/concurrent/Executor;Lorg/greenrobot/eventbus/EventBus;Ljava/lang/Class;Ljava/lang/Object;Lorg/greenrobot/eventbus/util/AsyncExecutor$1;)V
.registers 6
.line 33
invoke-direct {p0, p1, p2, p3, p4}, Lorg/greenrobot/eventbus/util/AsyncExecutor;-><init>(Ljava/util/concurrent/Executor;Lorg/greenrobot/eventbus/EventBus;Ljava/lang/Class;Ljava/lang/Object;)V
return-void
.end method
.method static synthetic access$200(Lorg/greenrobot/eventbus/util/AsyncExecutor;)Ljava/lang/reflect/Constructor;
.registers 1
.line 33
iget-object p0, p0, Lorg/greenrobot/eventbus/util/AsyncExecutor;->failureEventConstructor:Ljava/lang/reflect/Constructor;
return-object p0
.end method
.method static synthetic access$300(Lorg/greenrobot/eventbus/util/AsyncExecutor;)Ljava/lang/Object;
.registers 1
.line 33
iget-object p0, p0, Lorg/greenrobot/eventbus/util/AsyncExecutor;->scope:Ljava/lang/Object;
return-object p0
.end method
.method static synthetic access$400(Lorg/greenrobot/eventbus/util/AsyncExecutor;)Lorg/greenrobot/eventbus/EventBus;
.registers 1
.line 33
iget-object p0, p0, Lorg/greenrobot/eventbus/util/AsyncExecutor;->eventBus:Lorg/greenrobot/eventbus/EventBus;
return-object p0
.end method
.method public static builder()Lorg/greenrobot/eventbus/util/AsyncExecutor$Builder;
.registers 2
.line 86
new-instance v0, Lorg/greenrobot/eventbus/util/AsyncExecutor$Builder;
const/4 v1, 0x0
invoke-direct {v0, v1}, Lorg/greenrobot/eventbus/util/AsyncExecutor$Builder;-><init>(Lorg/greenrobot/eventbus/util/AsyncExecutor$1;)V
return-object v0
.end method
.method public static create()Lorg/greenrobot/eventbus/util/AsyncExecutor;
.registers 2
.line 90
new-instance v0, Lorg/greenrobot/eventbus/util/AsyncExecutor$Builder;
const/4 v1, 0x0
invoke-direct {v0, v1}, Lorg/greenrobot/eventbus/util/AsyncExecutor$Builder;-><init>(Lorg/greenrobot/eventbus/util/AsyncExecutor$1;)V
invoke-virtual {v0}, Lorg/greenrobot/eventbus/util/AsyncExecutor$Builder;->build()Lorg/greenrobot/eventbus/util/AsyncExecutor;
move-result-object v0
return-object v0
.end method
# virtual methods
.method public execute(Lorg/greenrobot/eventbus/util/AsyncExecutor$RunnableEx;)V
.registers 4
.line 112
iget-object v0, p0, Lorg/greenrobot/eventbus/util/AsyncExecutor;->threadPool:Ljava/util/concurrent/Executor;
new-instance v1, Lorg/greenrobot/eventbus/util/AsyncExecutor$1;
invoke-direct {v1, p0, p1}, Lorg/greenrobot/eventbus/util/AsyncExecutor$1;-><init>(Lorg/greenrobot/eventbus/util/AsyncExecutor;Lorg/greenrobot/eventbus/util/AsyncExecutor$RunnableEx;)V
invoke-interface {v0, v1}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V
return-void
.end method