granularity level: instruction
.class Landroidx/lifecycle/ClassesInfoCache$MethodReference;
.super Ljava/lang/Object;
.source "ClassesInfoCache.java"
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroidx/lifecycle/ClassesInfoCache;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x8
name = "MethodReference"
.end annotation
.field final mCallType:I
.field final mMethod:Ljava/lang/reflect/Method;
.method constructor <init>(ILjava/lang/reflect/Method;)V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput p1, p0, Landroidx/lifecycle/ClassesInfoCache$MethodReference;->mCallType:I
iput-object p2, p0, Landroidx/lifecycle/ClassesInfoCache$MethodReference;->mMethod:Ljava/lang/reflect/Method;
const/4 p1, 0x1
invoke-virtual {p2, p1}, Ljava/lang/reflect/Method;->setAccessible(Z)V
return-void
.end method
.method public equals(Ljava/lang/Object;)Z
.locals 4
const/4 v0, 0x1
if-ne p0, p1, :cond_0
return v0
:cond_0
const/4 v1, 0x0
if-eqz p1, :cond_3
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v2
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v3
if-eq v2, v3, :cond_1
goto :goto_1
:cond_1
check-cast p1, Landroidx/lifecycle/ClassesInfoCache$MethodReference;
iget v2, p0, Landroidx/lifecycle/ClassesInfoCache$MethodReference;->mCallType:I
iget v3, p1, Landroidx/lifecycle/ClassesInfoCache$MethodReference;->mCallType:I
if-ne v2, v3, :cond_2
iget-object v2, p0, Landroidx/lifecycle/ClassesInfoCache$MethodReference;->mMethod:Ljava/lang/reflect/Method;
invoke-virtual {v2}, Ljava/lang/reflect/Method;->getName()Ljava/lang/String;
move-result-object v2
iget-object p1, p1, Landroidx/lifecycle/ClassesInfoCache$MethodReference;->mMethod:Ljava/lang/reflect/Method;
invoke-virtual {p1}, Ljava/lang/reflect/Method;->getName()Ljava/lang/String;
move-result-object p1
invoke-virtual {v2, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p1
if-eqz p1, :cond_2
goto :goto_0
:cond_2
const/4 v0, 0x0
:goto_0
return v0
:goto_1
:cond_3
return v1
.end method
.method public hashCode()I
.locals 2
iget v0, p0, Landroidx/lifecycle/ClassesInfoCache$MethodReference;->mCallType:I
mul-int/lit8 v0, v0, 0x1f
iget-object v1, p0, Landroidx/lifecycle/ClassesInfoCache$MethodReference;->mMethod:Ljava/lang/reflect/Method;
invoke-virtual {v1}, Ljava/lang/reflect/Method;->getName()Ljava/lang/String;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/String;->hashCode()I
move-result v1
add-int/2addr v0, v1
return v0
.end method
.method invokeCallback(Landroidx/lifecycle/LifecycleOwner;Landroidx/lifecycle/Lifecycle$Event;Ljava/lang/Object;)V
.locals 4
:try_start_0
iget v0, p0, Landroidx/lifecycle/ClassesInfoCache$MethodReference;->mCallType:I
const/4 v1, 0x0
if-eqz v0, :cond_2
const/4 v2, 0x1
if-eq v0, v2, :cond_1
const/4 v3, 0x2
if-eq v0, v3, :cond_0
goto :goto_0
:cond_0
iget-object v0, p0, Landroidx/lifecycle/ClassesInfoCache$MethodReference;->mMethod:Ljava/lang/reflect/Method;
new-array v3, v3, [Ljava/lang/Object;
aput-object p1, v3, v1
aput-object p2, v3, v2
invoke-virtual {v0, p3, v3}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
goto :goto_0
:cond_1
iget-object p2, p0, Landroidx/lifecycle/ClassesInfoCache$MethodReference;->mMethod:Ljava/lang/reflect/Method;
new-array v0, v2, [Ljava/lang/Object;
aput-object p1, v0, v1
invoke-virtual {p2, p3, v0}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
goto :goto_0
:cond_2
iget-object p1, p0, Landroidx/lifecycle/ClassesInfoCache$MethodReference;->mMethod:Ljava/lang/reflect/Method;
new-array p2, v1, [Ljava/lang/Object;
invoke-virtual {p1, p3, p2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
:try_end_0
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_0} :catch_1
.catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_0
:goto_0
return-void
:catch_0
move-exception p1
new-instance p2, Ljava/lang/RuntimeException;
invoke-direct {p2, p1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
throw p2
:catch_1
move-exception p1
new-instance p2, Ljava/lang/RuntimeException;
invoke-virtual {p1}, Ljava/lang/reflect/InvocationTargetException;->getCause()Ljava/lang/Throwable;
move-result-object p1
const-string p3, "Failed to call observer method"
invoke-direct {p2, p3, p1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw p2
.end method