EventBus.smali
.class public Lorg/greenrobot/eventbus/EventBus;
.super Ljava/lang/Object;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lorg/greenrobot/eventbus/EventBus$PostingThreadState;
}
.end annotation
# static fields
.field static volatile s:Lorg/greenrobot/eventbus/EventBus;
.field private static final t:Lorg/greenrobot/eventbus/EventBusBuilder;
.field private static final u:Ljava/util/Map;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Map<",
"Ljava/lang/Class<",
"*>;",
"Ljava/util/List<",
"Ljava/lang/Class<",
"*>;>;>;"
}
.end annotation
.end field
# instance fields
.field private final a:Ljava/util/Map;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Map<",
"Ljava/lang/Class<",
"*>;",
"Ljava/util/concurrent/CopyOnWriteArrayList<",
"Lorg/greenrobot/eventbus/Subscription;",
">;>;"
}
.end annotation
.end field
.field private final b:Ljava/util/Map;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Map<",
"Ljava/lang/Object;",
"Ljava/util/List<",
"Ljava/lang/Class<",
"*>;>;>;"
}
.end annotation
.end field
.field private final c:Ljava/util/Map;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Map<",
"Ljava/lang/Class<",
"*>;",
"Ljava/lang/Object;",
">;"
}
.end annotation
.end field
.field private final d:Ljava/lang/ThreadLocal;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/ThreadLocal<",
"Lorg/greenrobot/eventbus/EventBus$PostingThreadState;",
">;"
}
.end annotation
.end field
.field private final e:Lorg/greenrobot/eventbus/MainThreadSupport;
.field private final f:Lorg/greenrobot/eventbus/Poster;
.field private final g:Lorg/greenrobot/eventbus/BackgroundPoster;
.field private final h:Lorg/greenrobot/eventbus/AsyncPoster;
.field private final i:Lorg/greenrobot/eventbus/SubscriberMethodFinder;
.field private final j:Ljava/util/concurrent/ExecutorService;
.field private final k:Z
.field private final l:Z
.field private final m:Z
.field private final n:Z
.field private final o:Z
.field private final p:Z
.field private final q:I
.field private final r:Lorg/greenrobot/eventbus/Logger;
# direct methods
.method static constructor <clinit>()V
.registers 1
new-instance v0, Lorg/greenrobot/eventbus/EventBusBuilder;
invoke-direct {v0}, Lorg/greenrobot/eventbus/EventBusBuilder;-><init>()V
sput-object v0, Lorg/greenrobot/eventbus/EventBus;->t:Lorg/greenrobot/eventbus/EventBusBuilder;
new-instance v0, Ljava/util/HashMap;
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
sput-object v0, Lorg/greenrobot/eventbus/EventBus;->u:Ljava/util/Map;
return-void
.end method
.method public constructor <init>()V
.registers 2
sget-object v0, Lorg/greenrobot/eventbus/EventBus;->t:Lorg/greenrobot/eventbus/EventBusBuilder;
invoke-direct {p0, v0}, Lorg/greenrobot/eventbus/EventBus;-><init>(Lorg/greenrobot/eventbus/EventBusBuilder;)V
return-void
.end method
.method constructor <init>(Lorg/greenrobot/eventbus/EventBusBuilder;)V
.registers 6
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
new-instance v0, Lorg/greenrobot/eventbus/EventBus$1;
invoke-direct {v0, p0}, Lorg/greenrobot/eventbus/EventBus$1;-><init>(Lorg/greenrobot/eventbus/EventBus;)V
iput-object v0, p0, Lorg/greenrobot/eventbus/EventBus;->d:Ljava/lang/ThreadLocal;
invoke-virtual {p1}, Lorg/greenrobot/eventbus/EventBusBuilder;->d()Lorg/greenrobot/eventbus/Logger;
move-result-object v0
iput-object v0, p0, Lorg/greenrobot/eventbus/EventBus;->r:Lorg/greenrobot/eventbus/Logger;
new-instance v0, Ljava/util/HashMap;
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
iput-object v0, p0, Lorg/greenrobot/eventbus/EventBus;->a:Ljava/util/Map;
new-instance v0, Ljava/util/HashMap;
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
iput-object v0, p0, Lorg/greenrobot/eventbus/EventBus;->b:Ljava/util/Map;
new-instance v0, Ljava/util/concurrent/ConcurrentHashMap;
invoke-direct {v0}, Ljava/util/concurrent/ConcurrentHashMap;-><init>()V
iput-object v0, p0, Lorg/greenrobot/eventbus/EventBus;->c:Ljava/util/Map;
invoke-virtual {p1}, Lorg/greenrobot/eventbus/EventBusBuilder;->e()Lorg/greenrobot/eventbus/MainThreadSupport;
move-result-object v0
iput-object v0, p0, Lorg/greenrobot/eventbus/EventBus;->e:Lorg/greenrobot/eventbus/MainThreadSupport;
if-eqz v0, :cond_32
invoke-interface {v0, p0}, Lorg/greenrobot/eventbus/MainThreadSupport;->a(Lorg/greenrobot/eventbus/EventBus;)Lorg/greenrobot/eventbus/Poster;
move-result-object v0
goto :goto_33
:cond_32
const/4 v0, 0x0
:goto_33
iput-object v0, p0, Lorg/greenrobot/eventbus/EventBus;->f:Lorg/greenrobot/eventbus/Poster;
new-instance v0, Lorg/greenrobot/eventbus/BackgroundPoster;
invoke-direct {v0, p0}, Lorg/greenrobot/eventbus/BackgroundPoster;-><init>(Lorg/greenrobot/eventbus/EventBus;)V
iput-object v0, p0, Lorg/greenrobot/eventbus/EventBus;->g:Lorg/greenrobot/eventbus/BackgroundPoster;
new-instance v0, Lorg/greenrobot/eventbus/AsyncPoster;
invoke-direct {v0, p0}, Lorg/greenrobot/eventbus/AsyncPoster;-><init>(Lorg/greenrobot/eventbus/EventBus;)V
iput-object v0, p0, Lorg/greenrobot/eventbus/EventBus;->h:Lorg/greenrobot/eventbus/AsyncPoster;
iget-object v0, p1, Lorg/greenrobot/eventbus/EventBusBuilder;->j:Ljava/util/List;
if-eqz v0, :cond_4c
invoke-interface {v0}, Ljava/util/List;->size()I
move-result v0
goto :goto_4d
:cond_4c
const/4 v0, 0x0
:goto_4d
iput v0, p0, Lorg/greenrobot/eventbus/EventBus;->q:I
new-instance v0, Lorg/greenrobot/eventbus/SubscriberMethodFinder;
iget-object v1, p1, Lorg/greenrobot/eventbus/EventBusBuilder;->j:Ljava/util/List;
iget-boolean v2, p1, Lorg/greenrobot/eventbus/EventBusBuilder;->h:Z
iget-boolean v3, p1, Lorg/greenrobot/eventbus/EventBusBuilder;->g:Z
invoke-direct {v0, v1, v2, v3}, Lorg/greenrobot/eventbus/SubscriberMethodFinder;-><init>(Ljava/util/List;ZZ)V
iput-object v0, p0, Lorg/greenrobot/eventbus/EventBus;->i:Lorg/greenrobot/eventbus/SubscriberMethodFinder;
iget-boolean v0, p1, Lorg/greenrobot/eventbus/EventBusBuilder;->a:Z
iput-boolean v0, p0, Lorg/greenrobot/eventbus/EventBus;->l:Z
iget-boolean v0, p1, Lorg/greenrobot/eventbus/EventBusBuilder;->b:Z
iput-boolean v0, p0, Lorg/greenrobot/eventbus/EventBus;->m:Z
iget-boolean v0, p1, Lorg/greenrobot/eventbus/EventBusBuilder;->c:Z
iput-boolean v0, p0, Lorg/greenrobot/eventbus/EventBus;->n:Z
iget-boolean v0, p1, Lorg/greenrobot/eventbus/EventBusBuilder;->d:Z
iput-boolean v0, p0, Lorg/greenrobot/eventbus/EventBus;->o:Z
iget-boolean v0, p1, Lorg/greenrobot/eventbus/EventBusBuilder;->e:Z
iput-boolean v0, p0, Lorg/greenrobot/eventbus/EventBus;->k:Z
iget-boolean v0, p1, Lorg/greenrobot/eventbus/EventBusBuilder;->f:Z
iput-boolean v0, p0, Lorg/greenrobot/eventbus/EventBus;->p:Z
iget-object p1, p1, Lorg/greenrobot/eventbus/EventBusBuilder;->i:Ljava/util/concurrent/ExecutorService;
iput-object p1, p0, Lorg/greenrobot/eventbus/EventBus;->j:Ljava/util/concurrent/ExecutorService;
return-void
.end method
.method static a(Ljava/util/List;[Ljava/lang/Class;)V
.registers 6
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List<",
"Ljava/lang/Class<",
"*>;>;[",
"Ljava/lang/Class<",
"*>;)V"
}
.end annotation
array-length v0, p1
const/4 v1, 0x0
:goto_2
if-ge v1, v0, :cond_19
aget-object v2, p1, v1
invoke-interface {p0, v2}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
move-result v3
if-nez v3, :cond_16
invoke-interface {p0, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
invoke-virtual {v2}, Ljava/lang/Class;->getInterfaces()[Ljava/lang/Class;
move-result-object v2
invoke-static {p0, v2}, Lorg/greenrobot/eventbus/EventBus;->a(Ljava/util/List;[Ljava/lang/Class;)V
:cond_16
add-int/lit8 v1, v1, 0x1
goto :goto_2
:cond_19
return-void
.end method
.method public static b()Lorg/greenrobot/eventbus/EventBusBuilder;
.registers 1
new-instance v0, Lorg/greenrobot/eventbus/EventBusBuilder;
invoke-direct {v0}, Lorg/greenrobot/eventbus/EventBusBuilder;-><init>()V
return-object v0
.end method
.method private c(Lorg/greenrobot/eventbus/Subscription;Ljava/lang/Object;)V
.registers 4
if-eqz p2, :cond_9
invoke-direct {p0}, Lorg/greenrobot/eventbus/EventBus;->j()Z
move-result v0
invoke-direct {p0, p1, p2, v0}, Lorg/greenrobot/eventbus/EventBus;->q(Lorg/greenrobot/eventbus/Subscription;Ljava/lang/Object;Z)V
:cond_9
return-void
.end method
.method public static d()Lorg/greenrobot/eventbus/EventBus;
.registers 2
sget-object v0, Lorg/greenrobot/eventbus/EventBus;->s:Lorg/greenrobot/eventbus/EventBus;
if-nez v0, :cond_17
const-class v1, Lorg/greenrobot/eventbus/EventBus;
monitor-enter v1
:try_start_7
sget-object v0, Lorg/greenrobot/eventbus/EventBus;->s:Lorg/greenrobot/eventbus/EventBus;
if-nez v0, :cond_12
new-instance v0, Lorg/greenrobot/eventbus/EventBus;
invoke-direct {v0}, Lorg/greenrobot/eventbus/EventBus;-><init>()V
sput-object v0, Lorg/greenrobot/eventbus/EventBus;->s:Lorg/greenrobot/eventbus/EventBus;
:cond_12
monitor-exit v1
goto :goto_17
:catchall_14
move-exception v0
monitor-exit v1
:try_end_16
.catchall {:try_start_7 .. :try_end_16} :catchall_14
throw v0
:cond_17
:goto_17
return-object v0
.end method
.method private g(Lorg/greenrobot/eventbus/Subscription;Ljava/lang/Object;Ljava/lang/Throwable;)V
.registers 8
instance-of v0, p2, Lorg/greenrobot/eventbus/SubscriberExceptionEvent;
if-eqz v0, :cond_54
iget-boolean v0, p0, Lorg/greenrobot/eventbus/EventBus;->l:Z
if-eqz v0, :cond_94
iget-object v0, p0, Lorg/greenrobot/eventbus/EventBus;->r:Lorg/greenrobot/eventbus/Logger;
sget-object v1, Ljava/util/logging/Level;->SEVERE:Ljava/util/logging/Level;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "SubscriberExceptionEvent subscriber "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object p1, p1, Lorg/greenrobot/eventbus/Subscription;->a:Ljava/lang/Object;
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object p1
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string p1, " threw an exception"
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-interface {v0, v1, p1, p3}, Lorg/greenrobot/eventbus/Logger;->b(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
check-cast p2, Lorg/greenrobot/eventbus/SubscriberExceptionEvent;
iget-object p1, p0, Lorg/greenrobot/eventbus/EventBus;->r:Lorg/greenrobot/eventbus/Logger;
sget-object p3, Ljava/util/logging/Level;->SEVERE:Ljava/util/logging/Level;
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "Initial event "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v1, p2, Lorg/greenrobot/eventbus/SubscriberExceptionEvent;->b:Ljava/lang/Object;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string v1, " caused exception in "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v1, p2, Lorg/greenrobot/eventbus/SubscriberExceptionEvent;->c:Ljava/lang/Object;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
iget-object p2, p2, Lorg/greenrobot/eventbus/SubscriberExceptionEvent;->a:Ljava/lang/Throwable;
invoke-interface {p1, p3, v0, p2}, Lorg/greenrobot/eventbus/Logger;->b(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
goto :goto_94
:cond_54
iget-boolean v0, p0, Lorg/greenrobot/eventbus/EventBus;->k:Z
if-nez v0, :cond_95
iget-boolean v0, p0, Lorg/greenrobot/eventbus/EventBus;->l:Z
if-eqz v0, :cond_86
iget-object v0, p0, Lorg/greenrobot/eventbus/EventBus;->r:Lorg/greenrobot/eventbus/Logger;
sget-object v1, Ljava/util/logging/Level;->SEVERE:Ljava/util/logging/Level;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "Could not dispatch event: "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p2}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v3
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string v3, " to subscribing class "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v3, p1, Lorg/greenrobot/eventbus/Subscription;->a:Ljava/lang/Object;
invoke-virtual {v3}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v3
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-interface {v0, v1, v2, p3}, Lorg/greenrobot/eventbus/Logger;->b(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
:cond_86
iget-boolean v0, p0, Lorg/greenrobot/eventbus/EventBus;->n:Z
if-eqz v0, :cond_94
new-instance v0, Lorg/greenrobot/eventbus/SubscriberExceptionEvent;
iget-object p1, p1, Lorg/greenrobot/eventbus/Subscription;->a:Ljava/lang/Object;
invoke-direct {v0, p0, p3, p2, p1}, Lorg/greenrobot/eventbus/SubscriberExceptionEvent;-><init>(Lorg/greenrobot/eventbus/EventBus;Ljava/lang/Throwable;Ljava/lang/Object;Ljava/lang/Object;)V
invoke-virtual {p0, v0}, Lorg/greenrobot/eventbus/EventBus;->m(Ljava/lang/Object;)V
:cond_94
:goto_94
return-void
:cond_95
new-instance p1, Lorg/greenrobot/eventbus/EventBusException;
const-string p2, "Invoking subscriber failed"
invoke-direct {p1, p2, p3}, Lorg/greenrobot/eventbus/EventBusException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw p1
.end method
.method private j()Z
.registers 2
iget-object v0, p0, Lorg/greenrobot/eventbus/EventBus;->e:Lorg/greenrobot/eventbus/MainThreadSupport;
if-eqz v0, :cond_d
invoke-interface {v0}, Lorg/greenrobot/eventbus/MainThreadSupport;->b()Z
move-result v0
if-eqz v0, :cond_b
goto :goto_d
:cond_b
const/4 v0, 0x0
goto :goto_e
:cond_d
:goto_d
const/4 v0, 0x1
:goto_e
return v0
.end method
.method private static l(Ljava/lang/Class;)Ljava/util/List;
.registers 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Class<",
"*>;)",
"Ljava/util/List<",
"Ljava/lang/Class<",
"*>;>;"
}
.end annotation
sget-object v0, Lorg/greenrobot/eventbus/EventBus;->u:Ljava/util/Map;
monitor-enter v0
:try_start_3
sget-object v1, Lorg/greenrobot/eventbus/EventBus;->u:Ljava/util/Map;
invoke-interface {v1, p0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/util/List;
if-nez v1, :cond_29
new-instance v1, Ljava/util/ArrayList;
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
move-object v2, p0
:goto_13
if-eqz v2, :cond_24
invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
invoke-virtual {v2}, Ljava/lang/Class;->getInterfaces()[Ljava/lang/Class;
move-result-object v3
invoke-static {v1, v3}, Lorg/greenrobot/eventbus/EventBus;->a(Ljava/util/List;[Ljava/lang/Class;)V
invoke-virtual {v2}, Ljava/lang/Class;->getSuperclass()Ljava/lang/Class;
move-result-object v2
goto :goto_13
:cond_24
sget-object v2, Lorg/greenrobot/eventbus/EventBus;->u:Ljava/util/Map;
invoke-interface {v2, p0, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
:cond_29
monitor-exit v0
return-object v1
:catchall_2b
move-exception p0
monitor-exit v0
:try_end_2d
.catchall {:try_start_3 .. :try_end_2d} :catchall_2b
throw p0
.end method
.method private n(Ljava/lang/Object;Lorg/greenrobot/eventbus/EventBus$PostingThreadState;)V
.registers 9
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Error;
}
.end annotation
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v0
iget-boolean v1, p0, Lorg/greenrobot/eventbus/EventBus;->p:Z
if-eqz v1, :cond_22
invoke-static {v0}, Lorg/greenrobot/eventbus/EventBus;->l(Ljava/lang/Class;)Ljava/util/List;
move-result-object v1
invoke-interface {v1}, Ljava/util/List;->size()I
move-result v2
const/4 v3, 0x0
const/4 v4, 0x0
:goto_12
if-ge v3, v2, :cond_26
invoke-interface {v1, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v5
check-cast v5, Ljava/lang/Class;
invoke-direct {p0, p1, p2, v5}, Lorg/greenrobot/eventbus/EventBus;->o(Ljava/lang/Object;Lorg/greenrobot/eventbus/EventBus$PostingThreadState;Ljava/lang/Class;)Z
move-result v5
or-int/2addr v4, v5
add-int/lit8 v3, v3, 0x1
goto :goto_12
:cond_22
invoke-direct {p0, p1, p2, v0}, Lorg/greenrobot/eventbus/EventBus;->o(Ljava/lang/Object;Lorg/greenrobot/eventbus/EventBus$PostingThreadState;Ljava/lang/Class;)Z
move-result v4
:cond_26
if-nez v4, :cond_58
iget-boolean p2, p0, Lorg/greenrobot/eventbus/EventBus;->m:Z
if-eqz p2, :cond_44
iget-object p2, p0, Lorg/greenrobot/eventbus/EventBus;->r:Lorg/greenrobot/eventbus/Logger;
sget-object v1, Ljava/util/logging/Level;->FINE:Ljava/util/logging/Level;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "No subscribers registered for event "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-interface {p2, v1, v2}, Lorg/greenrobot/eventbus/Logger;->a(Ljava/util/logging/Level;Ljava/lang/String;)V
:cond_44
iget-boolean p2, p0, Lorg/greenrobot/eventbus/EventBus;->o:Z
if-eqz p2, :cond_58
const-class p2, Lorg/greenrobot/eventbus/NoSubscriberEvent;
if-eq v0, p2, :cond_58
const-class p2, Lorg/greenrobot/eventbus/SubscriberExceptionEvent;
if-eq v0, p2, :cond_58
new-instance p2, Lorg/greenrobot/eventbus/NoSubscriberEvent;
invoke-direct {p2, p0, p1}, Lorg/greenrobot/eventbus/NoSubscriberEvent;-><init>(Lorg/greenrobot/eventbus/EventBus;Ljava/lang/Object;)V
invoke-virtual {p0, p2}, Lorg/greenrobot/eventbus/EventBus;->m(Ljava/lang/Object;)V
:cond_58
return-void
.end method
.method private o(Ljava/lang/Object;Lorg/greenrobot/eventbus/EventBus$PostingThreadState;Ljava/lang/Class;)Z
.registers 8
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Object;",
"Lorg/greenrobot/eventbus/EventBus$PostingThreadState;",
"Ljava/lang/Class<",
"*>;)Z"
}
.end annotation
monitor-enter p0
:try_start_1
iget-object v0, p0, Lorg/greenrobot/eventbus/EventBus;->a:Ljava/util/Map;
invoke-interface {v0, p3}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p3
check-cast p3, Ljava/util/concurrent/CopyOnWriteArrayList;
monitor-exit p0
:try_end_a
.catchall {:try_start_1 .. :try_end_a} :catchall_43
const/4 v0, 0x0
if-eqz p3, :cond_42
invoke-virtual {p3}, Ljava/util/concurrent/CopyOnWriteArrayList;->isEmpty()Z
move-result v1
if-nez v1, :cond_42
invoke-virtual {p3}, Ljava/util/concurrent/CopyOnWriteArrayList;->iterator()Ljava/util/Iterator;
move-result-object p3
:cond_17
invoke-interface {p3}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_40
invoke-interface {p3}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lorg/greenrobot/eventbus/Subscription;
iput-object p1, p2, Lorg/greenrobot/eventbus/EventBus$PostingThreadState;->e:Ljava/lang/Object;
iput-object v1, p2, Lorg/greenrobot/eventbus/EventBus$PostingThreadState;->d:Lorg/greenrobot/eventbus/Subscription;
const/4 v2, 0x0
:try_start_28
iget-boolean v3, p2, Lorg/greenrobot/eventbus/EventBus$PostingThreadState;->c:Z
invoke-direct {p0, v1, p1, v3}, Lorg/greenrobot/eventbus/EventBus;->q(Lorg/greenrobot/eventbus/Subscription;Ljava/lang/Object;Z)V
iget-boolean v1, p2, Lorg/greenrobot/eventbus/EventBus$PostingThreadState;->f:Z
:try_end_2f
.catchall {:try_start_28 .. :try_end_2f} :catchall_38
iput-object v2, p2, Lorg/greenrobot/eventbus/EventBus$PostingThreadState;->e:Ljava/lang/Object;
iput-object v2, p2, Lorg/greenrobot/eventbus/EventBus$PostingThreadState;->d:Lorg/greenrobot/eventbus/Subscription;
iput-boolean v0, p2, Lorg/greenrobot/eventbus/EventBus$PostingThreadState;->f:Z
if-eqz v1, :cond_17
goto :goto_40
:catchall_38
move-exception p1
iput-object v2, p2, Lorg/greenrobot/eventbus/EventBus$PostingThreadState;->e:Ljava/lang/Object;
iput-object v2, p2, Lorg/greenrobot/eventbus/EventBus$PostingThreadState;->d:Lorg/greenrobot/eventbus/Subscription;
iput-boolean v0, p2, Lorg/greenrobot/eventbus/EventBus$PostingThreadState;->f:Z
throw p1
:cond_40
:goto_40
const/4 p1, 0x1
return p1
:cond_42
return v0
:catchall_43
move-exception p1
:try_start_44
monitor-exit p0
:try_end_45
.catchall {:try_start_44 .. :try_end_45} :catchall_43
throw p1
.end method
.method private q(Lorg/greenrobot/eventbus/Subscription;Ljava/lang/Object;Z)V
.registers 6
sget-object v0, Lorg/greenrobot/eventbus/EventBus$2;->a:[I
iget-object v1, p1, Lorg/greenrobot/eventbus/Subscription;->b:Lorg/greenrobot/eventbus/SubscriberMethod;
iget-object v1, v1, Lorg/greenrobot/eventbus/SubscriberMethod;->b:Lorg/greenrobot/eventbus/ThreadMode;
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
move-result v1
aget v0, v0, v1
const/4 v1, 0x1
if-eq v0, v1, :cond_60
const/4 v1, 0x2
if-eq v0, v1, :cond_54
const/4 v1, 0x3
if-eq v0, v1, :cond_48
const/4 v1, 0x4
if-eq v0, v1, :cond_3c
const/4 p3, 0x5
if-ne v0, p3, :cond_21
iget-object p3, p0, Lorg/greenrobot/eventbus/EventBus;->h:Lorg/greenrobot/eventbus/AsyncPoster;
invoke-virtual {p3, p1, p2}, Lorg/greenrobot/eventbus/AsyncPoster;->a(Lorg/greenrobot/eventbus/Subscription;Ljava/lang/Object;)V
goto :goto_63
:cond_21
new-instance p2, Ljava/lang/IllegalStateException;
new-instance p3, Ljava/lang/StringBuilder;
invoke-direct {p3}, Ljava/lang/StringBuilder;-><init>()V
const-string v0, "Unknown thread mode: "
invoke-virtual {p3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object p1, p1, Lorg/greenrobot/eventbus/Subscription;->b:Lorg/greenrobot/eventbus/SubscriberMethod;
iget-object p1, p1, Lorg/greenrobot/eventbus/SubscriberMethod;->b:Lorg/greenrobot/eventbus/ThreadMode;
invoke-virtual {p3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p2, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p2
:cond_3c
if-eqz p3, :cond_44
iget-object p3, p0, Lorg/greenrobot/eventbus/EventBus;->g:Lorg/greenrobot/eventbus/BackgroundPoster;
invoke-virtual {p3, p1, p2}, Lorg/greenrobot/eventbus/BackgroundPoster;->a(Lorg/greenrobot/eventbus/Subscription;Ljava/lang/Object;)V
goto :goto_63
:cond_44
invoke-virtual {p0, p1, p2}, Lorg/greenrobot/eventbus/EventBus;->i(Lorg/greenrobot/eventbus/Subscription;Ljava/lang/Object;)V
goto :goto_63
:cond_48
iget-object p3, p0, Lorg/greenrobot/eventbus/EventBus;->f:Lorg/greenrobot/eventbus/Poster;
if-eqz p3, :cond_50
invoke-interface {p3, p1, p2}, Lorg/greenrobot/eventbus/Poster;->a(Lorg/greenrobot/eventbus/Subscription;Ljava/lang/Object;)V
goto :goto_63
:cond_50
invoke-virtual {p0, p1, p2}, Lorg/greenrobot/eventbus/EventBus;->i(Lorg/greenrobot/eventbus/Subscription;Ljava/lang/Object;)V
goto :goto_63
:cond_54
if-eqz p3, :cond_5a
invoke-virtual {p0, p1, p2}, Lorg/greenrobot/eventbus/EventBus;->i(Lorg/greenrobot/eventbus/Subscription;Ljava/lang/Object;)V
goto :goto_63
:cond_5a
iget-object p3, p0, Lorg/greenrobot/eventbus/EventBus;->f:Lorg/greenrobot/eventbus/Poster;
invoke-interface {p3, p1, p2}, Lorg/greenrobot/eventbus/Poster;->a(Lorg/greenrobot/eventbus/Subscription;Ljava/lang/Object;)V
goto :goto_63
:cond_60
invoke-virtual {p0, p1, p2}, Lorg/greenrobot/eventbus/EventBus;->i(Lorg/greenrobot/eventbus/Subscription;Ljava/lang/Object;)V
:goto_63
return-void
.end method
.method private u(Ljava/lang/Object;Lorg/greenrobot/eventbus/SubscriberMethod;)V
.registers 10
iget-object v0, p2, Lorg/greenrobot/eventbus/SubscriberMethod;->c:Ljava/lang/Class;
new-instance v1, Lorg/greenrobot/eventbus/Subscription;
invoke-direct {v1, p1, p2}, Lorg/greenrobot/eventbus/Subscription;-><init>(Ljava/lang/Object;Lorg/greenrobot/eventbus/SubscriberMethod;)V
iget-object v2, p0, Lorg/greenrobot/eventbus/EventBus;->a:Ljava/util/Map;
invoke-interface {v2, v0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/util/concurrent/CopyOnWriteArrayList;
if-nez v2, :cond_1c
new-instance v2, Ljava/util/concurrent/CopyOnWriteArrayList;
invoke-direct {v2}, Ljava/util/concurrent/CopyOnWriteArrayList;-><init>()V
iget-object v3, p0, Lorg/greenrobot/eventbus/EventBus;->a:Ljava/util/Map;
invoke-interface {v3, v0, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
goto :goto_22
:cond_1c
invoke-virtual {v2, v1}, Ljava/util/concurrent/CopyOnWriteArrayList;->contains(Ljava/lang/Object;)Z
move-result v3
if-nez v3, :cond_93
:goto_22
invoke-virtual {v2}, Ljava/util/concurrent/CopyOnWriteArrayList;->size()I
move-result v3
const/4 v4, 0x0
:goto_27
if-gt v4, v3, :cond_40
if-eq v4, v3, :cond_3d
iget v5, p2, Lorg/greenrobot/eventbus/SubscriberMethod;->d:I
invoke-virtual {v2, v4}, Ljava/util/concurrent/CopyOnWriteArrayList;->get(I)Ljava/lang/Object;
move-result-object v6
check-cast v6, Lorg/greenrobot/eventbus/Subscription;
iget-object v6, v6, Lorg/greenrobot/eventbus/Subscription;->b:Lorg/greenrobot/eventbus/SubscriberMethod;
iget v6, v6, Lorg/greenrobot/eventbus/SubscriberMethod;->d:I
if-le v5, v6, :cond_3a
goto :goto_3d
:cond_3a
add-int/lit8 v4, v4, 0x1
goto :goto_27
:cond_3d
:goto_3d
invoke-virtual {v2, v4, v1}, Ljava/util/concurrent/CopyOnWriteArrayList;->add(ILjava/lang/Object;)V
:cond_40
iget-object v2, p0, Lorg/greenrobot/eventbus/EventBus;->b:Ljava/util/Map;
invoke-interface {v2, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/util/List;
if-nez v2, :cond_54
new-instance v2, Ljava/util/ArrayList;
invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V
iget-object v3, p0, Lorg/greenrobot/eventbus/EventBus;->b:Ljava/util/Map;
invoke-interface {v3, p1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
:cond_54
invoke-interface {v2, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
iget-boolean p1, p2, Lorg/greenrobot/eventbus/SubscriberMethod;->e:Z
if-eqz p1, :cond_92
iget-boolean p1, p0, Lorg/greenrobot/eventbus/EventBus;->p:Z
if-eqz p1, :cond_89
iget-object p1, p0, Lorg/greenrobot/eventbus/EventBus;->c:Ljava/util/Map;
invoke-interface {p1}, Ljava/util/Map;->entrySet()Ljava/util/Set;
move-result-object p1
invoke-interface {p1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object p1
:cond_69
:goto_69
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
move-result p2
if-eqz p2, :cond_92
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object p2
check-cast p2, Ljava/util/Map$Entry;
invoke-interface {p2}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/lang/Class;
invoke-virtual {v0, v2}, Ljava/lang/Class;->isAssignableFrom(Ljava/lang/Class;)Z
move-result v2
if-eqz v2, :cond_69
invoke-interface {p2}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
move-result-object p2
invoke-direct {p0, v1, p2}, Lorg/greenrobot/eventbus/EventBus;->c(Lorg/greenrobot/eventbus/Subscription;Ljava/lang/Object;)V
goto :goto_69
:cond_89
iget-object p1, p0, Lorg/greenrobot/eventbus/EventBus;->c:Ljava/util/Map;
invoke-interface {p1, v0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
invoke-direct {p0, v1, p1}, Lorg/greenrobot/eventbus/EventBus;->c(Lorg/greenrobot/eventbus/Subscription;Ljava/lang/Object;)V
:cond_92
return-void
:cond_93
new-instance p2, Lorg/greenrobot/eventbus/EventBusException;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "Subscriber "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object p1
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string p1, " already registered to event "
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p2, p1}, Lorg/greenrobot/eventbus/EventBusException;-><init>(Ljava/lang/String;)V
throw p2
.end method
.method private w(Ljava/lang/Object;Ljava/lang/Class;)V
.registers 8
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Object;",
"Ljava/lang/Class<",
"*>;)V"
}
.end annotation
iget-object v0, p0, Lorg/greenrobot/eventbus/EventBus;->a:Ljava/util/Map;
invoke-interface {v0, p2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p2
check-cast p2, Ljava/util/List;
if-eqz p2, :cond_28
invoke-interface {p2}, Ljava/util/List;->size()I
move-result v0
const/4 v1, 0x0
const/4 v2, 0x0
:goto_10
if-ge v2, v0, :cond_28
invoke-interface {p2, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v3
check-cast v3, Lorg/greenrobot/eventbus/Subscription;
iget-object v4, v3, Lorg/greenrobot/eventbus/Subscription;->a:Ljava/lang/Object;
if-ne v4, p1, :cond_25
iput-boolean v1, v3, Lorg/greenrobot/eventbus/Subscription;->c:Z
invoke-interface {p2, v2}, Ljava/util/List;->remove(I)Ljava/lang/Object;
add-int/lit8 v2, v2, -0x1
add-int/lit8 v0, v0, -0x1
:cond_25
add-int/lit8 v2, v2, 0x1
goto :goto_10
:cond_28
return-void
.end method
# virtual methods
.method e()Ljava/util/concurrent/ExecutorService;
.registers 2
iget-object v0, p0, Lorg/greenrobot/eventbus/EventBus;->j:Ljava/util/concurrent/ExecutorService;
return-object v0
.end method
.method public f()Lorg/greenrobot/eventbus/Logger;
.registers 2
iget-object v0, p0, Lorg/greenrobot/eventbus/EventBus;->r:Lorg/greenrobot/eventbus/Logger;
return-object v0
.end method
.method h(Lorg/greenrobot/eventbus/PendingPost;)V
.registers 4
iget-object v0, p1, Lorg/greenrobot/eventbus/PendingPost;->a:Ljava/lang/Object;
iget-object v1, p1, Lorg/greenrobot/eventbus/PendingPost;->b:Lorg/greenrobot/eventbus/Subscription;
invoke-static {p1}, Lorg/greenrobot/eventbus/PendingPost;->b(Lorg/greenrobot/eventbus/PendingPost;)V
iget-boolean p1, v1, Lorg/greenrobot/eventbus/Subscription;->c:Z
if-eqz p1, :cond_e
invoke-virtual {p0, v1, v0}, Lorg/greenrobot/eventbus/EventBus;->i(Lorg/greenrobot/eventbus/Subscription;Ljava/lang/Object;)V
:cond_e
return-void
.end method
.method i(Lorg/greenrobot/eventbus/Subscription;Ljava/lang/Object;)V
.registers 7
:try_start_0
iget-object v0, p1, Lorg/greenrobot/eventbus/Subscription;->b:Lorg/greenrobot/eventbus/SubscriberMethod;
iget-object v0, v0, Lorg/greenrobot/eventbus/SubscriberMethod;->a:Ljava/lang/reflect/Method;
iget-object v1, p1, Lorg/greenrobot/eventbus/Subscription;->a:Ljava/lang/Object;
const/4 v2, 0x1
new-array v2, v2, [Ljava/lang/Object;
const/4 v3, 0x0
aput-object p2, v2, v3
invoke-virtual {v0, v1, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
:try_end_f
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_f} :catch_19
.catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_f} :catch_10
goto :goto_21
:catch_10
move-exception p1
new-instance p2, Ljava/lang/IllegalStateException;
const-string v0, "Unexpected exception"
invoke-direct {p2, v0, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw p2
:catch_19
move-exception v0
invoke-virtual {v0}, Ljava/lang/reflect/InvocationTargetException;->getCause()Ljava/lang/Throwable;
move-result-object v0
invoke-direct {p0, p1, p2, v0}, Lorg/greenrobot/eventbus/EventBus;->g(Lorg/greenrobot/eventbus/Subscription;Ljava/lang/Object;Ljava/lang/Throwable;)V
:goto_21
return-void
.end method
.method public declared-synchronized k(Ljava/lang/Object;)Z
.registers 3
monitor-enter p0
:try_start_1
iget-object v0, p0, Lorg/greenrobot/eventbus/EventBus;->b:Ljava/util/Map;
invoke-interface {v0, p1}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
move-result p1
:try_end_7
.catchall {:try_start_1 .. :try_end_7} :catchall_9
monitor-exit p0
return p1
:catchall_9
move-exception p1
monitor-exit p0
throw p1
.end method
.method public m(Ljava/lang/Object;)V
.registers 5
iget-object v0, p0, Lorg/greenrobot/eventbus/EventBus;->d:Ljava/lang/ThreadLocal;
invoke-virtual {v0}, Ljava/lang/ThreadLocal;->get()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lorg/greenrobot/eventbus/EventBus$PostingThreadState;
iget-object v1, v0, Lorg/greenrobot/eventbus/EventBus$PostingThreadState;->a:Ljava/util/List;
invoke-interface {v1, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
iget-boolean p1, v0, Lorg/greenrobot/eventbus/EventBus$PostingThreadState;->b:Z
if-nez p1, :cond_40
invoke-direct {p0}, Lorg/greenrobot/eventbus/EventBus;->j()Z
move-result p1
iput-boolean p1, v0, Lorg/greenrobot/eventbus/EventBus$PostingThreadState;->c:Z
const/4 p1, 0x1
iput-boolean p1, v0, Lorg/greenrobot/eventbus/EventBus$PostingThreadState;->b:Z
iget-boolean p1, v0, Lorg/greenrobot/eventbus/EventBus$PostingThreadState;->f:Z
if-nez p1, :cond_38
:goto_1e
const/4 p1, 0x0
:try_start_1f
invoke-interface {v1}, Ljava/util/List;->isEmpty()Z
move-result v2
if-nez v2, :cond_2d
invoke-interface {v1, p1}, Ljava/util/List;->remove(I)Ljava/lang/Object;
move-result-object v2
invoke-direct {p0, v2, v0}, Lorg/greenrobot/eventbus/EventBus;->n(Ljava/lang/Object;Lorg/greenrobot/eventbus/EventBus$PostingThreadState;)V
:try_end_2c
.catchall {:try_start_1f .. :try_end_2c} :catchall_32
goto :goto_1e
:cond_2d
iput-boolean p1, v0, Lorg/greenrobot/eventbus/EventBus$PostingThreadState;->b:Z
iput-boolean p1, v0, Lorg/greenrobot/eventbus/EventBus$PostingThreadState;->c:Z
goto :goto_40
:catchall_32
move-exception v1
iput-boolean p1, v0, Lorg/greenrobot/eventbus/EventBus$PostingThreadState;->b:Z
iput-boolean p1, v0, Lorg/greenrobot/eventbus/EventBus$PostingThreadState;->c:Z
throw v1
:cond_38
new-instance p1, Lorg/greenrobot/eventbus/EventBusException;
const-string v0, "Internal error. Abort state was not reset"
invoke-direct {p1, v0}, Lorg/greenrobot/eventbus/EventBusException;-><init>(Ljava/lang/String;)V
throw p1
:cond_40
:goto_40
return-void
.end method
.method public p(Ljava/lang/Object;)V
.registers 5
iget-object v0, p0, Lorg/greenrobot/eventbus/EventBus;->c:Ljava/util/Map;
monitor-enter v0
:try_start_3
iget-object v1, p0, Lorg/greenrobot/eventbus/EventBus;->c:Ljava/util/Map;
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v2
invoke-interface {v1, v2, p1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
monitor-exit v0
:try_end_d
.catchall {:try_start_3 .. :try_end_d} :catchall_11
invoke-virtual {p0, p1}, Lorg/greenrobot/eventbus/EventBus;->m(Ljava/lang/Object;)V
return-void
:catchall_11
move-exception p1
:try_start_12
monitor-exit v0
:try_end_13
.catchall {:try_start_12 .. :try_end_13} :catchall_11
throw p1
.end method
.method public r(Ljava/lang/Object;)V
.registers 4
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v0
iget-object v1, p0, Lorg/greenrobot/eventbus/EventBus;->i:Lorg/greenrobot/eventbus/SubscriberMethodFinder;
invoke-virtual {v1, v0}, Lorg/greenrobot/eventbus/SubscriberMethodFinder;->a(Ljava/lang/Class;)Ljava/util/List;
move-result-object v0
monitor-enter p0
:try_start_b
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_f
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_1f
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lorg/greenrobot/eventbus/SubscriberMethod;
invoke-direct {p0, p1, v1}, Lorg/greenrobot/eventbus/EventBus;->u(Ljava/lang/Object;Lorg/greenrobot/eventbus/SubscriberMethod;)V
goto :goto_f
:cond_1f
monitor-exit p0
return-void
:catchall_21
move-exception p1
monitor-exit p0
:try_end_23
.catchall {:try_start_b .. :try_end_23} :catchall_21
throw p1
.end method
.method public s(Ljava/lang/Class;)Ljava/lang/Object;
.registers 4
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Ljava/lang/Class<",
"TT;>;)TT;"
}
.end annotation
iget-object v0, p0, Lorg/greenrobot/eventbus/EventBus;->c:Ljava/util/Map;
monitor-enter v0
:try_start_3
iget-object v1, p0, Lorg/greenrobot/eventbus/EventBus;->c:Ljava/util/Map;
invoke-interface {v1, p1}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v1
invoke-virtual {p1, v1}, Ljava/lang/Class;->cast(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
monitor-exit v0
return-object p1
:catchall_f
move-exception p1
monitor-exit v0
:try_end_11
.catchall {:try_start_3 .. :try_end_11} :catchall_f
throw p1
.end method
.method public t(Ljava/lang/Object;)Z
.registers 5
iget-object v0, p0, Lorg/greenrobot/eventbus/EventBus;->c:Ljava/util/Map;
monitor-enter v0
:try_start_3
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v1
iget-object v2, p0, Lorg/greenrobot/eventbus/EventBus;->c:Ljava/util/Map;
invoke-interface {v2, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v2
invoke-virtual {p1, v2}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result p1
if-eqz p1, :cond_1b
iget-object p1, p0, Lorg/greenrobot/eventbus/EventBus;->c:Ljava/util/Map;
invoke-interface {p1, v1}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
const/4 p1, 0x1
monitor-exit v0
return p1
:cond_1b
const/4 p1, 0x0
monitor-exit v0
return p1
:catchall_1e
move-exception p1
monitor-exit v0
:try_end_20
.catchall {:try_start_3 .. :try_end_20} :catchall_1e
throw p1
.end method
.method public toString()Ljava/lang/String;
.registers 3
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "EventBus[indexCount="
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget v1, p0, Lorg/greenrobot/eventbus/EventBus;->q:I
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string v1, ", eventInheritance="
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-boolean v1, p0, Lorg/greenrobot/eventbus/EventBus;->p:Z
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
const-string v1, "]"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public declared-synchronized v(Ljava/lang/Object;)V
.registers 6
monitor-enter p0
:try_start_1
iget-object v0, p0, Lorg/greenrobot/eventbus/EventBus;->b:Ljava/util/Map;
invoke-interface {v0, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/util/List;
if-eqz v0, :cond_25
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_f
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_1f
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/lang/Class;
invoke-direct {p0, p1, v1}, Lorg/greenrobot/eventbus/EventBus;->w(Ljava/lang/Object;Ljava/lang/Class;)V
goto :goto_f
:cond_1f
iget-object v0, p0, Lorg/greenrobot/eventbus/EventBus;->b:Ljava/util/Map;
invoke-interface {v0, p1}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
goto :goto_41
:cond_25
iget-object v0, p0, Lorg/greenrobot/eventbus/EventBus;->r:Lorg/greenrobot/eventbus/Logger;
sget-object v1, Ljava/util/logging/Level;->WARNING:Ljava/util/logging/Level;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "Subscriber to unregister was not registered before: "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object p1
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-interface {v0, v1, p1}, Lorg/greenrobot/eventbus/Logger;->a(Ljava/util/logging/Level;Ljava/lang/String;)V
:try_end_41
.catchall {:try_start_1 .. :try_end_41} :catchall_43
:goto_41
monitor-exit p0
return-void
:catchall_43
move-exception p1
monitor-exit p0
throw p1
.end method