You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
310 lines
6.3 KiB
310 lines
6.3 KiB
.class public abstract Lcom/google/common/reflect/AbstractInvocationHandler; |
|
.super Ljava/lang/Object; |
|
.source "AbstractInvocationHandler.java" |
|
|
|
# interfaces |
|
.implements Ljava/lang/reflect/InvocationHandler; |
|
|
|
|
|
# annotations |
|
.annotation build Lcom/google/common/annotations/Beta; |
|
.end annotation |
|
|
|
|
|
# static fields |
|
.field private static final NO_ARGS:[Ljava/lang/Object; |
|
|
|
|
|
# direct methods |
|
.method static constructor <clinit>()V |
|
.locals 1 |
|
|
|
.prologue |
|
.line 47 |
|
const/4 v0, 0x0 |
|
|
|
new-array v0, v0, [Ljava/lang/Object; |
|
|
|
sput-object v0, Lcom/google/common/reflect/AbstractInvocationHandler;->NO_ARGS:[Ljava/lang/Object; |
|
|
|
return-void |
|
.end method |
|
|
|
.method public constructor <init>()V |
|
.locals 0 |
|
|
|
.prologue |
|
.line 45 |
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V |
|
|
|
return-void |
|
.end method |
|
|
|
.method private static isProxyOfSameInterfaces(Ljava/lang/Object;Ljava/lang/Class;)Z |
|
.locals 2 |
|
.annotation system Ldalvik/annotation/Signature; |
|
value = { |
|
"(", |
|
"Ljava/lang/Object;", |
|
"Ljava/lang/Class", |
|
"<*>;)Z" |
|
} |
|
.end annotation |
|
|
|
.prologue |
|
.line 131 |
|
invoke-virtual {p1, p0}, Ljava/lang/Class;->isInstance(Ljava/lang/Object;)Z |
|
|
|
move-result v0 |
|
|
|
if-nez v0, :cond_0 |
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class; |
|
|
|
move-result-object v0 |
|
|
|
invoke-static {v0}, Ljava/lang/reflect/Proxy;->isProxyClass(Ljava/lang/Class;)Z |
|
|
|
move-result v0 |
|
|
|
if-eqz v0, :cond_1 |
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0}, Ljava/lang/Class;->getInterfaces()[Ljava/lang/Class; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {p1}, Ljava/lang/Class;->getInterfaces()[Ljava/lang/Class; |
|
|
|
move-result-object v1 |
|
|
|
invoke-static {v0, v1}, Ljava/util/Arrays;->equals([Ljava/lang/Object;[Ljava/lang/Object;)Z |
|
|
|
move-result v0 |
|
|
|
if-eqz v0, :cond_1 |
|
|
|
:cond_0 |
|
const/4 v0, 0x1 |
|
|
|
:goto_0 |
|
return v0 |
|
|
|
:cond_1 |
|
const/4 v0, 0x0 |
|
|
|
goto :goto_0 |
|
.end method |
|
|
|
|
|
# virtual methods |
|
.method public equals(Ljava/lang/Object;)Z |
|
.locals 1 |
|
|
|
.prologue |
|
.line 110 |
|
invoke-super {p0, p1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z |
|
|
|
move-result v0 |
|
|
|
return v0 |
|
.end method |
|
|
|
.method protected abstract handleInvocation(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object; |
|
.end method |
|
|
|
.method public hashCode()I |
|
.locals 1 |
|
|
|
.prologue |
|
.line 118 |
|
invoke-super {p0}, Ljava/lang/Object;->hashCode()I |
|
|
|
move-result v0 |
|
|
|
return v0 |
|
.end method |
|
|
|
.method public final invoke(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object; |
|
.locals 4 |
|
.param p3 # [Ljava/lang/Object; |
|
.annotation runtime Ljavax/annotation/Nullable; |
|
.end annotation |
|
.end param |
|
|
|
.prologue |
|
const/4 v0, 0x1 |
|
|
|
const/4 v1, 0x0 |
|
|
|
.line 65 |
|
if-nez p3, :cond_0 |
|
|
|
.line 66 |
|
sget-object p3, Lcom/google/common/reflect/AbstractInvocationHandler;->NO_ARGS:[Ljava/lang/Object; |
|
|
|
.line 68 |
|
:cond_0 |
|
array-length v2, p3 |
|
|
|
if-nez v2, :cond_1 |
|
|
|
invoke-virtual {p2}, Ljava/lang/reflect/Method;->getName()Ljava/lang/String; |
|
|
|
move-result-object v2 |
|
|
|
const-string v3, "hashCode" |
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z |
|
|
|
move-result v2 |
|
|
|
if-eqz v2, :cond_1 |
|
|
|
.line 69 |
|
invoke-virtual {p0}, Lcom/google/common/reflect/AbstractInvocationHandler;->hashCode()I |
|
|
|
move-result v0 |
|
|
|
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer; |
|
|
|
move-result-object v0 |
|
|
|
.line 87 |
|
:goto_0 |
|
return-object v0 |
|
|
|
.line 71 |
|
:cond_1 |
|
array-length v2, p3 |
|
|
|
if-ne v2, v0, :cond_5 |
|
|
|
invoke-virtual {p2}, Ljava/lang/reflect/Method;->getName()Ljava/lang/String; |
|
|
|
move-result-object v2 |
|
|
|
const-string v3, "equals" |
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z |
|
|
|
move-result v2 |
|
|
|
if-eqz v2, :cond_5 |
|
|
|
invoke-virtual {p2}, Ljava/lang/reflect/Method;->getParameterTypes()[Ljava/lang/Class; |
|
|
|
move-result-object v2 |
|
|
|
aget-object v2, v2, v1 |
|
|
|
const-class v3, Ljava/lang/Object; |
|
|
|
if-ne v2, v3, :cond_5 |
|
|
|
.line 74 |
|
aget-object v2, p3, v1 |
|
|
|
.line 75 |
|
if-nez v2, :cond_2 |
|
|
|
.line 76 |
|
invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean; |
|
|
|
move-result-object v0 |
|
|
|
goto :goto_0 |
|
|
|
.line 78 |
|
:cond_2 |
|
if-ne p1, v2, :cond_3 |
|
|
|
.line 79 |
|
invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean; |
|
|
|
move-result-object v0 |
|
|
|
goto :goto_0 |
|
|
|
.line 81 |
|
:cond_3 |
|
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class; |
|
|
|
move-result-object v3 |
|
|
|
invoke-static {v2, v3}, Lcom/google/common/reflect/AbstractInvocationHandler;->isProxyOfSameInterfaces(Ljava/lang/Object;Ljava/lang/Class;)Z |
|
|
|
move-result v3 |
|
|
|
if-eqz v3, :cond_4 |
|
|
|
invoke-static {v2}, Ljava/lang/reflect/Proxy;->getInvocationHandler(Ljava/lang/Object;)Ljava/lang/reflect/InvocationHandler; |
|
|
|
move-result-object v2 |
|
|
|
invoke-virtual {p0, v2}, Lcom/google/common/reflect/AbstractInvocationHandler;->equals(Ljava/lang/Object;)Z |
|
|
|
move-result v2 |
|
|
|
if-eqz v2, :cond_4 |
|
|
|
:goto_1 |
|
invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean; |
|
|
|
move-result-object v0 |
|
|
|
goto :goto_0 |
|
|
|
:cond_4 |
|
move v0, v1 |
|
|
|
goto :goto_1 |
|
|
|
.line 84 |
|
:cond_5 |
|
array-length v0, p3 |
|
|
|
if-nez v0, :cond_6 |
|
|
|
invoke-virtual {p2}, Ljava/lang/reflect/Method;->getName()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
const-string v1, "toString" |
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z |
|
|
|
move-result v0 |
|
|
|
if-eqz v0, :cond_6 |
|
|
|
.line 85 |
|
invoke-virtual {p0}, Lcom/google/common/reflect/AbstractInvocationHandler;->toString()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
goto :goto_0 |
|
|
|
.line 87 |
|
:cond_6 |
|
invoke-virtual {p0, p1, p2, p3}, Lcom/google/common/reflect/AbstractInvocationHandler;->handleInvocation(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
goto :goto_0 |
|
.end method |
|
|
|
.method public toString()Ljava/lang/String; |
|
.locals 1 |
|
|
|
.prologue |
|
.line 127 |
|
invoke-super {p0}, Ljava/lang/Object;->toString()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method
|
|
|