mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2025-01-09 13:43:22 +00:00
394 lines
11 KiB
Smali
394 lines
11 KiB
Smali
![]() |
.class Lcom/google/common/eventbus/Subscriber;
|
||
|
.super Ljava/lang/Object;
|
||
|
.source "Subscriber.java"
|
||
|
|
||
|
|
||
|
# annotations
|
||
|
.annotation runtime Lcom/google/common/eventbus/ElementTypesAreNonnullByDefault;
|
||
|
.end annotation
|
||
|
|
||
|
.annotation system Ldalvik/annotation/MemberClasses;
|
||
|
value = {
|
||
|
Lcom/google/common/eventbus/Subscriber$SynchronizedSubscriber;
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
|
||
|
# instance fields
|
||
|
.field private bus:Lcom/google/common/eventbus/EventBus;
|
||
|
|
||
|
.field private final executor:Ljava/util/concurrent/Executor;
|
||
|
|
||
|
.field private final method:Ljava/lang/reflect/Method;
|
||
|
|
||
|
.field final target:Ljava/lang/Object;
|
||
|
|
||
|
|
||
|
# direct methods
|
||
|
.method private constructor <init>(Lcom/google/common/eventbus/EventBus;Ljava/lang/Object;Ljava/lang/reflect/Method;)V
|
||
|
.locals 0
|
||
|
|
||
|
.line 57
|
||
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
||
|
|
||
|
iput-object p1, p0, Lcom/google/common/eventbus/Subscriber;->bus:Lcom/google/common/eventbus/EventBus;
|
||
|
|
||
|
.line 59
|
||
|
invoke-static {p2}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
|
||
|
move-result-object p2
|
||
|
|
||
|
iput-object p2, p0, Lcom/google/common/eventbus/Subscriber;->target:Ljava/lang/Object;
|
||
|
|
||
|
iput-object p3, p0, Lcom/google/common/eventbus/Subscriber;->method:Ljava/lang/reflect/Method;
|
||
|
|
||
|
const/4 p2, 0x1
|
||
|
|
||
|
.line 61
|
||
|
invoke-virtual {p3, p2}, Ljava/lang/reflect/Method;->setAccessible(Z)V
|
||
|
|
||
|
.line 63
|
||
|
invoke-virtual {p1}, Lcom/google/common/eventbus/EventBus;->executor()Ljava/util/concurrent/Executor;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
iput-object p1, p0, Lcom/google/common/eventbus/Subscriber;->executor:Ljava/util/concurrent/Executor;
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method synthetic constructor <init>(Lcom/google/common/eventbus/EventBus;Ljava/lang/Object;Ljava/lang/reflect/Method;Lcom/google/common/eventbus/Subscriber$1;)V
|
||
|
.locals 0
|
||
|
|
||
|
.line 36
|
||
|
invoke-direct {p0, p1, p2, p3}, Lcom/google/common/eventbus/Subscriber;-><init>(Lcom/google/common/eventbus/EventBus;Ljava/lang/Object;Ljava/lang/reflect/Method;)V
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method private context(Ljava/lang/Object;)Lcom/google/common/eventbus/SubscriberExceptionContext;
|
||
|
.locals 3
|
||
|
|
||
|
.line 100
|
||
|
new-instance v0, Lcom/google/common/eventbus/SubscriberExceptionContext;
|
||
|
|
||
|
iget-object v1, p0, Lcom/google/common/eventbus/Subscriber;->bus:Lcom/google/common/eventbus/EventBus;
|
||
|
|
||
|
iget-object v2, p0, Lcom/google/common/eventbus/Subscriber;->target:Ljava/lang/Object;
|
||
|
|
||
|
iget-object p0, p0, Lcom/google/common/eventbus/Subscriber;->method:Ljava/lang/reflect/Method;
|
||
|
|
||
|
invoke-direct {v0, v1, p1, v2, p0}, Lcom/google/common/eventbus/SubscriberExceptionContext;-><init>(Lcom/google/common/eventbus/EventBus;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/reflect/Method;)V
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method static create(Lcom/google/common/eventbus/EventBus;Ljava/lang/Object;Ljava/lang/reflect/Method;)Lcom/google/common/eventbus/Subscriber;
|
||
|
.locals 2
|
||
|
|
||
|
.line 40
|
||
|
invoke-static {p2}, Lcom/google/common/eventbus/Subscriber;->isDeclaredThreadSafe(Ljava/lang/reflect/Method;)Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-eqz v0, :cond_0
|
||
|
|
||
|
.line 41
|
||
|
new-instance v0, Lcom/google/common/eventbus/Subscriber;
|
||
|
|
||
|
invoke-direct {v0, p0, p1, p2}, Lcom/google/common/eventbus/Subscriber;-><init>(Lcom/google/common/eventbus/EventBus;Ljava/lang/Object;Ljava/lang/reflect/Method;)V
|
||
|
|
||
|
goto :goto_0
|
||
|
|
||
|
.line 42
|
||
|
:cond_0
|
||
|
new-instance v0, Lcom/google/common/eventbus/Subscriber$SynchronizedSubscriber;
|
||
|
|
||
|
const/4 v1, 0x0
|
||
|
|
||
|
invoke-direct {v0, p0, p1, p2, v1}, Lcom/google/common/eventbus/Subscriber$SynchronizedSubscriber;-><init>(Lcom/google/common/eventbus/EventBus;Ljava/lang/Object;Ljava/lang/reflect/Method;Lcom/google/common/eventbus/Subscriber$1;)V
|
||
|
|
||
|
:goto_0
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method private static isDeclaredThreadSafe(Ljava/lang/reflect/Method;)Z
|
||
|
.locals 1
|
||
|
|
||
|
.line 125
|
||
|
const-class v0, Lcom/google/common/eventbus/AllowConcurrentEvents;
|
||
|
|
||
|
invoke-virtual {p0, v0}, Ljava/lang/reflect/Method;->getAnnotation(Ljava/lang/Class;)Ljava/lang/annotation/Annotation;
|
||
|
|
||
|
move-result-object p0
|
||
|
|
||
|
if-eqz p0, :cond_0
|
||
|
|
||
|
const/4 p0, 0x1
|
||
|
|
||
|
goto :goto_0
|
||
|
|
||
|
:cond_0
|
||
|
const/4 p0, 0x0
|
||
|
|
||
|
:goto_0
|
||
|
return p0
|
||
|
.end method
|
||
|
|
||
|
|
||
|
# virtual methods
|
||
|
.method final dispatchEvent(Ljava/lang/Object;)V
|
||
|
.locals 2
|
||
|
|
||
|
iget-object v0, p0, Lcom/google/common/eventbus/Subscriber;->executor:Ljava/util/concurrent/Executor;
|
||
|
|
||
|
.line 68
|
||
|
new-instance v1, Lcom/google/common/eventbus/Subscriber$$ExternalSyntheticLambda0;
|
||
|
|
||
|
invoke-direct {v1, p0, p1}, Lcom/google/common/eventbus/Subscriber$$ExternalSyntheticLambda0;-><init>(Lcom/google/common/eventbus/Subscriber;Ljava/lang/Object;)V
|
||
|
|
||
|
invoke-interface {v0, v1}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public final equals(Ljava/lang/Object;)Z
|
||
|
.locals 3
|
||
|
.param p1 # Ljava/lang/Object;
|
||
|
.annotation runtime Ljavax/annotation/CheckForNull;
|
||
|
.end annotation
|
||
|
.end param
|
||
|
|
||
|
.line 110
|
||
|
instance-of v0, p1, Lcom/google/common/eventbus/Subscriber;
|
||
|
|
||
|
const/4 v1, 0x0
|
||
|
|
||
|
if-eqz v0, :cond_0
|
||
|
|
||
|
.line 111
|
||
|
check-cast p1, Lcom/google/common/eventbus/Subscriber;
|
||
|
|
||
|
iget-object v0, p0, Lcom/google/common/eventbus/Subscriber;->target:Ljava/lang/Object;
|
||
|
|
||
|
.line 115
|
||
|
iget-object v2, p1, Lcom/google/common/eventbus/Subscriber;->target:Ljava/lang/Object;
|
||
|
|
||
|
if-ne v0, v2, :cond_0
|
||
|
|
||
|
iget-object p0, p0, Lcom/google/common/eventbus/Subscriber;->method:Ljava/lang/reflect/Method;
|
||
|
|
||
|
iget-object p1, p1, Lcom/google/common/eventbus/Subscriber;->method:Ljava/lang/reflect/Method;
|
||
|
|
||
|
invoke-virtual {p0, p1}, Ljava/lang/reflect/Method;->equals(Ljava/lang/Object;)Z
|
||
|
|
||
|
move-result p0
|
||
|
|
||
|
if-eqz p0, :cond_0
|
||
|
|
||
|
const/4 v1, 0x1
|
||
|
|
||
|
:cond_0
|
||
|
return v1
|
||
|
.end method
|
||
|
|
||
|
.method public final hashCode()I
|
||
|
.locals 1
|
||
|
|
||
|
iget-object v0, p0, Lcom/google/common/eventbus/Subscriber;->method:Ljava/lang/reflect/Method;
|
||
|
|
||
|
.line 105
|
||
|
invoke-virtual {v0}, Ljava/lang/reflect/Method;->hashCode()I
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
add-int/lit8 v0, v0, 0x1f
|
||
|
|
||
|
mul-int/lit8 v0, v0, 0x1f
|
||
|
|
||
|
iget-object p0, p0, Lcom/google/common/eventbus/Subscriber;->target:Ljava/lang/Object;
|
||
|
|
||
|
invoke-static {p0}, Ljava/lang/System;->identityHashCode(Ljava/lang/Object;)I
|
||
|
|
||
|
move-result p0
|
||
|
|
||
|
add-int/2addr v0, p0
|
||
|
|
||
|
return v0
|
||
|
.end method
|
||
|
|
||
|
.method invokeSubscriberMethod(Ljava/lang/Object;)V
|
||
|
.locals 4
|
||
|
.annotation system Ldalvik/annotation/Throws;
|
||
|
value = {
|
||
|
Ljava/lang/reflect/InvocationTargetException;
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
:try_start_0
|
||
|
iget-object v0, p0, Lcom/google/common/eventbus/Subscriber;->method:Ljava/lang/reflect/Method;
|
||
|
|
||
|
iget-object p0, p0, Lcom/google/common/eventbus/Subscriber;->target:Ljava/lang/Object;
|
||
|
|
||
|
const/4 v1, 0x1
|
||
|
|
||
|
new-array v1, v1, [Ljava/lang/Object;
|
||
|
|
||
|
.line 85
|
||
|
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
|
||
|
move-result-object v2
|
||
|
|
||
|
const/4 v3, 0x0
|
||
|
|
||
|
aput-object v2, v1, v3
|
||
|
|
||
|
invoke-virtual {v0, p0, v1}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
:try_end_0
|
||
|
.catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_2
|
||
|
.catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_1
|
||
|
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_0} :catch_0
|
||
|
|
||
|
return-void
|
||
|
|
||
|
:catch_0
|
||
|
move-exception p0
|
||
|
|
||
|
.line 91
|
||
|
invoke-virtual {p0}, Ljava/lang/reflect/InvocationTargetException;->getCause()Ljava/lang/Throwable;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
instance-of p1, p1, Ljava/lang/Error;
|
||
|
|
||
|
if-eqz p1, :cond_0
|
||
|
|
||
|
.line 92
|
||
|
invoke-virtual {p0}, Ljava/lang/reflect/InvocationTargetException;->getCause()Ljava/lang/Throwable;
|
||
|
|
||
|
move-result-object p0
|
||
|
|
||
|
check-cast p0, Ljava/lang/Error;
|
||
|
|
||
|
throw p0
|
||
|
|
||
|
.line 94
|
||
|
:cond_0
|
||
|
throw p0
|
||
|
|
||
|
:catch_1
|
||
|
move-exception p0
|
||
|
|
||
|
.line 89
|
||
|
new-instance v0, Ljava/lang/Error;
|
||
|
|
||
|
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v1}, Ljava/lang/String;->length()I
|
||
|
|
||
|
move-result v1
|
||
|
|
||
|
add-int/lit8 v1, v1, 0x1c
|
||
|
|
||
|
new-instance v2, Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-direct {v2, v1}, Ljava/lang/StringBuilder;-><init>(I)V
|
||
|
|
||
|
const-string v1, "Method became inaccessible: "
|
||
|
|
||
|
invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
invoke-direct {v0, p1, p0}, Ljava/lang/Error;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
|
||
|
|
||
|
throw v0
|
||
|
|
||
|
:catch_2
|
||
|
move-exception p0
|
||
|
|
||
|
.line 87
|
||
|
new-instance v0, Ljava/lang/Error;
|
||
|
|
||
|
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v1}, Ljava/lang/String;->length()I
|
||
|
|
||
|
move-result v1
|
||
|
|
||
|
add-int/lit8 v1, v1, 0x21
|
||
|
|
||
|
new-instance v2, Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-direct {v2, v1}, Ljava/lang/StringBuilder;-><init>(I)V
|
||
|
|
||
|
const-string v1, "Method rejected target/argument: "
|
||
|
|
||
|
invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
invoke-direct {v0, p1, p0}, Ljava/lang/Error;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
|
||
|
|
||
|
throw v0
|
||
|
.end method
|
||
|
|
||
|
.method synthetic lambda$dispatchEvent$0$com-google-common-eventbus-Subscriber(Ljava/lang/Object;)V
|
||
|
.locals 2
|
||
|
|
||
|
.line 71
|
||
|
:try_start_0
|
||
|
invoke-virtual {p0, p1}, Lcom/google/common/eventbus/Subscriber;->invokeSubscriberMethod(Ljava/lang/Object;)V
|
||
|
:try_end_0
|
||
|
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_0} :catch_0
|
||
|
|
||
|
goto :goto_0
|
||
|
|
||
|
:catch_0
|
||
|
move-exception v0
|
||
|
|
||
|
iget-object v1, p0, Lcom/google/common/eventbus/Subscriber;->bus:Lcom/google/common/eventbus/EventBus;
|
||
|
|
||
|
.line 73
|
||
|
invoke-virtual {v0}, Ljava/lang/reflect/InvocationTargetException;->getCause()Ljava/lang/Throwable;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-direct {p0, p1}, Lcom/google/common/eventbus/Subscriber;->context(Ljava/lang/Object;)Lcom/google/common/eventbus/SubscriberExceptionContext;
|
||
|
|
||
|
move-result-object p0
|
||
|
|
||
|
invoke-virtual {v1, v0, p0}, Lcom/google/common/eventbus/EventBus;->handleSubscriberException(Ljava/lang/Throwable;Lcom/google/common/eventbus/SubscriberExceptionContext;)V
|
||
|
|
||
|
:goto_0
|
||
|
return-void
|
||
|
.end method
|