720 lines
13 KiB
Smali
720 lines
13 KiB
Smali
.class public final Lcom/google/gson/m;
|
|
.super Lcom/google/gson/JsonElement;
|
|
.source "JsonPrimitive.java"
|
|
|
|
|
|
# static fields
|
|
.field private static final aQN:[Ljava/lang/Class;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"[",
|
|
"Ljava/lang/Class<",
|
|
"*>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# instance fields
|
|
.field public value:Ljava/lang/Object;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 3
|
|
|
|
const/16 v0, 0x10
|
|
|
|
new-array v0, v0, [Ljava/lang/Class;
|
|
|
|
sget-object v1, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
sget-object v1, Ljava/lang/Long;->TYPE:Ljava/lang/Class;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
sget-object v1, Ljava/lang/Short;->TYPE:Ljava/lang/Class;
|
|
|
|
const/4 v2, 0x2
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
sget-object v1, Ljava/lang/Float;->TYPE:Ljava/lang/Class;
|
|
|
|
const/4 v2, 0x3
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
sget-object v1, Ljava/lang/Double;->TYPE:Ljava/lang/Class;
|
|
|
|
const/4 v2, 0x4
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
sget-object v1, Ljava/lang/Byte;->TYPE:Ljava/lang/Class;
|
|
|
|
const/4 v2, 0x5
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
sget-object v1, Ljava/lang/Boolean;->TYPE:Ljava/lang/Class;
|
|
|
|
const/4 v2, 0x6
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
sget-object v1, Ljava/lang/Character;->TYPE:Ljava/lang/Class;
|
|
|
|
const/4 v2, 0x7
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const-class v1, Ljava/lang/Integer;
|
|
|
|
const/16 v2, 0x8
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const-class v1, Ljava/lang/Long;
|
|
|
|
const/16 v2, 0x9
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const-class v1, Ljava/lang/Short;
|
|
|
|
const/16 v2, 0xa
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const-class v1, Ljava/lang/Float;
|
|
|
|
const/16 v2, 0xb
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const-class v1, Ljava/lang/Double;
|
|
|
|
const/16 v2, 0xc
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const-class v1, Ljava/lang/Byte;
|
|
|
|
const/16 v2, 0xd
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const-class v1, Ljava/lang/Boolean;
|
|
|
|
const/16 v2, 0xe
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const-class v1, Ljava/lang/Character;
|
|
|
|
const/16 v2, 0xf
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
sput-object v0, Lcom/google/gson/m;->aQN:[Ljava/lang/Class;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Ljava/lang/Boolean;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Lcom/google/gson/JsonElement;-><init>()V
|
|
|
|
invoke-direct {p0, p1}, Lcom/google/gson/m;->setValue(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Ljava/lang/Number;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Lcom/google/gson/JsonElement;-><init>()V
|
|
|
|
invoke-direct {p0, p1}, Lcom/google/gson/m;->setValue(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method constructor <init>(Ljava/lang/Object;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Lcom/google/gson/JsonElement;-><init>()V
|
|
|
|
invoke-direct {p0, p1}, Lcom/google/gson/m;->setValue(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Ljava/lang/String;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Lcom/google/gson/JsonElement;-><init>()V
|
|
|
|
invoke-direct {p0, p1}, Lcom/google/gson/m;->setValue(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private static a(Lcom/google/gson/m;)Z
|
|
.locals 2
|
|
|
|
iget-object p0, p0, Lcom/google/gson/m;->value:Ljava/lang/Object;
|
|
|
|
instance-of v0, p0, Ljava/lang/Number;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
check-cast p0, Ljava/lang/Number;
|
|
|
|
instance-of v0, p0, Ljava/math/BigInteger;
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
instance-of v0, p0, Ljava/lang/Long;
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
instance-of v0, p0, Ljava/lang/Integer;
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
instance-of v0, p0, Ljava/lang/Short;
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
instance-of p0, p0, Ljava/lang/Byte;
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
return v1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
const/4 p0, 0x1
|
|
|
|
return p0
|
|
|
|
:cond_2
|
|
return v1
|
|
.end method
|
|
|
|
.method private static aH(Ljava/lang/Object;)Z
|
|
.locals 6
|
|
|
|
instance-of v0, p0, Ljava/lang/String;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return v1
|
|
|
|
:cond_0
|
|
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object p0
|
|
|
|
sget-object v0, Lcom/google/gson/m;->aQN:[Ljava/lang/Class;
|
|
|
|
array-length v2, v0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
:goto_0
|
|
if-ge v4, v2, :cond_2
|
|
|
|
aget-object v5, v0, v4
|
|
|
|
invoke-virtual {v5, p0}, Ljava/lang/Class;->isAssignableFrom(Ljava/lang/Class;)Z
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_1
|
|
|
|
return v1
|
|
|
|
:cond_1
|
|
add-int/lit8 v4, v4, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
return v3
|
|
.end method
|
|
|
|
.method private setValue(Ljava/lang/Object;)V
|
|
.locals 1
|
|
|
|
instance-of v0, p1, Ljava/lang/Character;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
check-cast p1, Ljava/lang/Character;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Character;->charValue()C
|
|
|
|
move-result p1
|
|
|
|
invoke-static {p1}, Ljava/lang/String;->valueOf(C)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/google/gson/m;->value:Ljava/lang/Object;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
instance-of v0, p1, Ljava/lang/Number;
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
invoke-static {p1}, Lcom/google/gson/m;->aH(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v0, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
:goto_0
|
|
const/4 v0, 0x1
|
|
|
|
:goto_1
|
|
invoke-static {v0}, Lcom/google/gson/b/a;->checkArgument(Z)V
|
|
|
|
iput-object p1, p0, Lcom/google/gson/m;->value:Ljava/lang/Object;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final equals(Ljava/lang/Object;)Z
|
|
.locals 6
|
|
|
|
const/4 v0, 0x1
|
|
|
|
if-ne p0, p1, :cond_0
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz p1, :cond_9
|
|
|
|
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, Lcom/google/gson/m;
|
|
|
|
iget-object v2, p0, Lcom/google/gson/m;->value:Ljava/lang/Object;
|
|
|
|
if-nez v2, :cond_3
|
|
|
|
iget-object p1, p1, Lcom/google/gson/m;->value:Ljava/lang/Object;
|
|
|
|
if-nez p1, :cond_2
|
|
|
|
return v0
|
|
|
|
:cond_2
|
|
return v1
|
|
|
|
:cond_3
|
|
invoke-static {p0}, Lcom/google/gson/m;->a(Lcom/google/gson/m;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_5
|
|
|
|
invoke-static {p1}, Lcom/google/gson/m;->a(Lcom/google/gson/m;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_5
|
|
|
|
invoke-virtual {p0}, Lcom/google/gson/m;->vG()Ljava/lang/Number;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Ljava/lang/Number;->longValue()J
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-virtual {p1}, Lcom/google/gson/m;->vG()Ljava/lang/Number;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Number;->longValue()J
|
|
|
|
move-result-wide v4
|
|
|
|
cmp-long p1, v2, v4
|
|
|
|
if-nez p1, :cond_4
|
|
|
|
return v0
|
|
|
|
:cond_4
|
|
return v1
|
|
|
|
:cond_5
|
|
iget-object v2, p0, Lcom/google/gson/m;->value:Ljava/lang/Object;
|
|
|
|
instance-of v2, v2, Ljava/lang/Number;
|
|
|
|
if-eqz v2, :cond_8
|
|
|
|
iget-object v2, p1, Lcom/google/gson/m;->value:Ljava/lang/Object;
|
|
|
|
instance-of v2, v2, Ljava/lang/Number;
|
|
|
|
if-eqz v2, :cond_8
|
|
|
|
invoke-virtual {p0}, Lcom/google/gson/m;->vG()Ljava/lang/Number;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Ljava/lang/Number;->doubleValue()D
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-virtual {p1}, Lcom/google/gson/m;->vG()Ljava/lang/Number;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Number;->doubleValue()D
|
|
|
|
move-result-wide v4
|
|
|
|
cmpl-double p1, v2, v4
|
|
|
|
if-eqz p1, :cond_7
|
|
|
|
invoke-static {v2, v3}, Ljava/lang/Double;->isNaN(D)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_6
|
|
|
|
invoke-static {v4, v5}, Ljava/lang/Double;->isNaN(D)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_6
|
|
|
|
goto :goto_0
|
|
|
|
:cond_6
|
|
return v1
|
|
|
|
:cond_7
|
|
:goto_0
|
|
return v0
|
|
|
|
:cond_8
|
|
iget-object v0, p0, Lcom/google/gson/m;->value:Ljava/lang/Object;
|
|
|
|
iget-object p1, p1, Lcom/google/gson/m;->value:Ljava/lang/Object;
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
|
|
:cond_9
|
|
:goto_1
|
|
return v1
|
|
.end method
|
|
|
|
.method public final getAsBoolean()Z
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/google/gson/m;->value:Ljava/lang/Object;
|
|
|
|
instance-of v1, v0, Ljava/lang/Boolean;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
check-cast v0, Ljava/lang/Boolean;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
invoke-virtual {p0}, Lcom/google/gson/m;->vH()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Ljava/lang/Boolean;->parseBoolean(Ljava/lang/String;)Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public final getAsDouble()D
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/google/gson/m;->value:Ljava/lang/Object;
|
|
|
|
instance-of v0, v0, Ljava/lang/Number;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {p0}, Lcom/google/gson/m;->vG()Ljava/lang/Number;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Number;->doubleValue()D
|
|
|
|
move-result-wide v0
|
|
|
|
return-wide v0
|
|
|
|
:cond_0
|
|
invoke-virtual {p0}, Lcom/google/gson/m;->vH()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Ljava/lang/Double;->parseDouble(Ljava/lang/String;)D
|
|
|
|
move-result-wide v0
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public final getAsInt()I
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/google/gson/m;->value:Ljava/lang/Object;
|
|
|
|
instance-of v0, v0, Ljava/lang/Number;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {p0}, Lcom/google/gson/m;->vG()Ljava/lang/Number;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Number;->intValue()I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
invoke-virtual {p0}, Lcom/google/gson/m;->vH()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public final getAsLong()J
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/google/gson/m;->value:Ljava/lang/Object;
|
|
|
|
instance-of v0, v0, Ljava/lang/Number;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {p0}, Lcom/google/gson/m;->vG()Ljava/lang/Number;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Number;->longValue()J
|
|
|
|
move-result-wide v0
|
|
|
|
return-wide v0
|
|
|
|
:cond_0
|
|
invoke-virtual {p0}, Lcom/google/gson/m;->vH()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
|
|
|
|
move-result-wide v0
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public final hashCode()I
|
|
.locals 4
|
|
|
|
iget-object v0, p0, Lcom/google/gson/m;->value:Ljava/lang/Object;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/16 v0, 0x1f
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
invoke-static {p0}, Lcom/google/gson/m;->a(Lcom/google/gson/m;)Z
|
|
|
|
move-result v0
|
|
|
|
const/16 v1, 0x20
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-virtual {p0}, Lcom/google/gson/m;->vG()Ljava/lang/Number;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Number;->longValue()J
|
|
|
|
move-result-wide v2
|
|
|
|
ushr-long v0, v2, v1
|
|
|
|
xor-long/2addr v0, v2
|
|
|
|
long-to-int v1, v0
|
|
|
|
return v1
|
|
|
|
:cond_1
|
|
iget-object v0, p0, Lcom/google/gson/m;->value:Ljava/lang/Object;
|
|
|
|
instance-of v2, v0, Ljava/lang/Number;
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
invoke-virtual {p0}, Lcom/google/gson/m;->vG()Ljava/lang/Number;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Number;->doubleValue()D
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-static {v2, v3}, Ljava/lang/Double;->doubleToLongBits(D)J
|
|
|
|
move-result-wide v2
|
|
|
|
ushr-long v0, v2, v1
|
|
|
|
xor-long/2addr v0, v2
|
|
|
|
long-to-int v1, v0
|
|
|
|
return v1
|
|
|
|
:cond_2
|
|
invoke-virtual {v0}, Ljava/lang/Object;->hashCode()I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public final vG()Ljava/lang/Number;
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/google/gson/m;->value:Ljava/lang/Object;
|
|
|
|
instance-of v1, v0, Ljava/lang/String;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
new-instance v1, Lcom/google/gson/b/f;
|
|
|
|
check-cast v0, Ljava/lang/String;
|
|
|
|
invoke-direct {v1, v0}, Lcom/google/gson/b/f;-><init>(Ljava/lang/String;)V
|
|
|
|
return-object v1
|
|
|
|
:cond_0
|
|
check-cast v0, Ljava/lang/Number;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final vH()Ljava/lang/String;
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/google/gson/m;->value:Ljava/lang/Object;
|
|
|
|
instance-of v1, v0, Ljava/lang/Number;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-virtual {p0}, Lcom/google/gson/m;->vG()Ljava/lang/Number;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
instance-of v1, v0, Ljava/lang/Boolean;
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
check-cast v0, Ljava/lang/Boolean;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Boolean;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
|
|
:cond_1
|
|
check-cast v0, Ljava/lang/String;
|
|
|
|
return-object v0
|
|
.end method
|