.class public final Lcom/google/gson/JsonPrimitive; .super Lcom/google/gson/JsonElement; .source "" # static fields .field private static final PRIMITIVE_TYPES:[Ljava/lang/Class; .annotation system Ldalvik/annotation/Signature; value = { "[", "Ljava/lang/Class<", "*>;" } .end annotation .end field # instance fields .field private value:Ljava/lang/Object; # direct methods .method static constructor ()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/JsonPrimitive;->PRIMITIVE_TYPES:[Ljava/lang/Class; return-void .end method .method public constructor (Ljava/lang/Boolean;)V .locals 0 invoke-direct {p0}, Lcom/google/gson/JsonElement;->()V invoke-virtual {p0, p1}, Lcom/google/gson/JsonPrimitive;->setValue(Ljava/lang/Object;)V return-void .end method .method public constructor (Ljava/lang/Character;)V .locals 0 invoke-direct {p0}, Lcom/google/gson/JsonElement;->()V invoke-virtual {p0, p1}, Lcom/google/gson/JsonPrimitive;->setValue(Ljava/lang/Object;)V return-void .end method .method public constructor (Ljava/lang/Number;)V .locals 0 invoke-direct {p0}, Lcom/google/gson/JsonElement;->()V invoke-virtual {p0, p1}, Lcom/google/gson/JsonPrimitive;->setValue(Ljava/lang/Object;)V return-void .end method .method constructor (Ljava/lang/Object;)V .locals 0 invoke-direct {p0}, Lcom/google/gson/JsonElement;->()V invoke-virtual {p0, p1}, Lcom/google/gson/JsonPrimitive;->setValue(Ljava/lang/Object;)V return-void .end method .method public constructor (Ljava/lang/String;)V .locals 0 invoke-direct {p0}, Lcom/google/gson/JsonElement;->()V invoke-virtual {p0, p1}, Lcom/google/gson/JsonPrimitive;->setValue(Ljava/lang/Object;)V return-void .end method .method private static isIntegral(Lcom/google/gson/JsonPrimitive;)Z .locals 2 iget-object p0, p0, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object; instance-of v0, p0, Ljava/lang/Number; const/4 v1, 0x0 if-eqz v0, :cond_1 check-cast p0, Ljava/lang/Number; instance-of v0, p0, Ljava/math/BigInteger; if-nez v0, :cond_0 instance-of v0, p0, Ljava/lang/Long; if-nez v0, :cond_0 instance-of v0, p0, Ljava/lang/Integer; if-nez v0, :cond_0 instance-of v0, p0, Ljava/lang/Short; if-nez v0, :cond_0 instance-of p0, p0, Ljava/lang/Byte; if-eqz p0, :cond_1 :cond_0 const/4 v1, 0x1 :cond_1 return v1 .end method .method private static isPrimitiveOrString(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/JsonPrimitive;->PRIMITIVE_TYPES:[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 # virtual methods .method bridge synthetic deepCopy()Lcom/google/gson/JsonElement; .locals 1 invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->deepCopy()Lcom/google/gson/JsonPrimitive; move-result-object v0 return-object v0 .end method .method deepCopy()Lcom/google/gson/JsonPrimitive; .locals 0 return-object p0 .end method .method public 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 const-class v2, Lcom/google/gson/JsonPrimitive; invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class; move-result-object v3 if-eq v2, v3, :cond_1 goto :goto_3 :cond_1 check-cast p1, Lcom/google/gson/JsonPrimitive; iget-object v2, p0, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object; if-nez v2, :cond_3 iget-object p1, p1, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object; if-nez p1, :cond_2 goto :goto_0 :cond_2 const/4 v0, 0x0 :goto_0 return v0 :cond_3 invoke-static {p0}, Lcom/google/gson/JsonPrimitive;->isIntegral(Lcom/google/gson/JsonPrimitive;)Z move-result v2 if-eqz v2, :cond_5 invoke-static {p1}, Lcom/google/gson/JsonPrimitive;->isIntegral(Lcom/google/gson/JsonPrimitive;)Z move-result v2 if-eqz v2, :cond_5 invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsNumber()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/JsonPrimitive;->getAsNumber()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 goto :goto_1 :cond_4 const/4 v0, 0x0 :goto_1 return v0 :cond_5 iget-object v2, p0, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object; instance-of v2, v2, Ljava/lang/Number; if-eqz v2, :cond_8 iget-object v2, p1, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object; instance-of v2, v2, Ljava/lang/Number; if-eqz v2, :cond_8 invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsNumber()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/JsonPrimitive;->getAsNumber()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_2 :cond_6 const/4 v0, 0x0 :cond_7 :goto_2 return v0 :cond_8 iget-object v0, p0, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object; iget-object p1, p1, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object; invoke-virtual {v0, p1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z move-result p1 return p1 :cond_9 :goto_3 return v1 .end method .method public getAsBigDecimal()Ljava/math/BigDecimal; .locals 2 iget-object v0, p0, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object; instance-of v1, v0, Ljava/math/BigDecimal; if-eqz v1, :cond_0 check-cast v0, Ljava/math/BigDecimal; goto :goto_0 :cond_0 new-instance v1, Ljava/math/BigDecimal; invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String; move-result-object v0 invoke-direct {v1, v0}, Ljava/math/BigDecimal;->(Ljava/lang/String;)V move-object v0, v1 :goto_0 return-object v0 .end method .method public getAsBigInteger()Ljava/math/BigInteger; .locals 2 iget-object v0, p0, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object; instance-of v1, v0, Ljava/math/BigInteger; if-eqz v1, :cond_0 check-cast v0, Ljava/math/BigInteger; goto :goto_0 :cond_0 new-instance v1, Ljava/math/BigInteger; invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String; move-result-object v0 invoke-direct {v1, v0}, Ljava/math/BigInteger;->(Ljava/lang/String;)V move-object v0, v1 :goto_0 return-object v0 .end method .method public getAsBoolean()Z .locals 1 invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->isBoolean()Z move-result v0 if-eqz v0, :cond_0 invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsBooleanWrapper()Ljava/lang/Boolean; move-result-object v0 invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z move-result v0 return v0 :cond_0 invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsString()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 getAsBooleanWrapper()Ljava/lang/Boolean; .locals 1 iget-object v0, p0, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object; check-cast v0, Ljava/lang/Boolean; return-object v0 .end method .method public getAsByte()B .locals 1 invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->isNumber()Z move-result v0 if-eqz v0, :cond_0 invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsNumber()Ljava/lang/Number; move-result-object v0 invoke-virtual {v0}, Ljava/lang/Number;->byteValue()B move-result v0 goto :goto_0 :cond_0 invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsString()Ljava/lang/String; move-result-object v0 invoke-static {v0}, Ljava/lang/Byte;->parseByte(Ljava/lang/String;)B move-result v0 :goto_0 return v0 .end method .method public getAsCharacter()C .locals 2 invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsString()Ljava/lang/String; move-result-object v0 const/4 v1, 0x0 invoke-virtual {v0, v1}, Ljava/lang/String;->charAt(I)C move-result v0 return v0 .end method .method public getAsDouble()D .locals 2 invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->isNumber()Z move-result v0 if-eqz v0, :cond_0 invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsNumber()Ljava/lang/Number; move-result-object v0 invoke-virtual {v0}, Ljava/lang/Number;->doubleValue()D move-result-wide v0 goto :goto_0 :cond_0 invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsString()Ljava/lang/String; move-result-object v0 invoke-static {v0}, Ljava/lang/Double;->parseDouble(Ljava/lang/String;)D move-result-wide v0 :goto_0 return-wide v0 .end method .method public getAsFloat()F .locals 1 invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->isNumber()Z move-result v0 if-eqz v0, :cond_0 invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsNumber()Ljava/lang/Number; move-result-object v0 invoke-virtual {v0}, Ljava/lang/Number;->floatValue()F move-result v0 goto :goto_0 :cond_0 invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsString()Ljava/lang/String; move-result-object v0 invoke-static {v0}, Ljava/lang/Float;->parseFloat(Ljava/lang/String;)F move-result v0 :goto_0 return v0 .end method .method public getAsInt()I .locals 1 invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->isNumber()Z move-result v0 if-eqz v0, :cond_0 invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsNumber()Ljava/lang/Number; move-result-object v0 invoke-virtual {v0}, Ljava/lang/Number;->intValue()I move-result v0 goto :goto_0 :cond_0 invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsString()Ljava/lang/String; move-result-object v0 invoke-static {v0}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I move-result v0 :goto_0 return v0 .end method .method public getAsLong()J .locals 2 invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->isNumber()Z move-result v0 if-eqz v0, :cond_0 invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsNumber()Ljava/lang/Number; move-result-object v0 invoke-virtual {v0}, Ljava/lang/Number;->longValue()J move-result-wide v0 goto :goto_0 :cond_0 invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsString()Ljava/lang/String; move-result-object v0 invoke-static {v0}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J move-result-wide v0 :goto_0 return-wide v0 .end method .method public getAsNumber()Ljava/lang/Number; .locals 2 iget-object v0, p0, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object; instance-of v1, v0, Ljava/lang/String; if-eqz v1, :cond_0 new-instance v1, Lcom/google/gson/internal/LazilyParsedNumber; check-cast v0, Ljava/lang/String; invoke-direct {v1, v0}, Lcom/google/gson/internal/LazilyParsedNumber;->(Ljava/lang/String;)V goto :goto_0 :cond_0 move-object v1, v0 check-cast v1, Ljava/lang/Number; :goto_0 return-object v1 .end method .method public getAsShort()S .locals 1 invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->isNumber()Z move-result v0 if-eqz v0, :cond_0 invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsNumber()Ljava/lang/Number; move-result-object v0 invoke-virtual {v0}, Ljava/lang/Number;->shortValue()S move-result v0 goto :goto_0 :cond_0 invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsString()Ljava/lang/String; move-result-object v0 invoke-static {v0}, Ljava/lang/Short;->parseShort(Ljava/lang/String;)S move-result v0 :goto_0 return v0 .end method .method public getAsString()Ljava/lang/String; .locals 1 invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->isNumber()Z move-result v0 if-eqz v0, :cond_0 invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsNumber()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 invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->isBoolean()Z move-result v0 if-eqz v0, :cond_1 invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsBooleanWrapper()Ljava/lang/Boolean; move-result-object v0 invoke-virtual {v0}, Ljava/lang/Boolean;->toString()Ljava/lang/String; move-result-object v0 return-object v0 :cond_1 iget-object v0, p0, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object; check-cast v0, Ljava/lang/String; return-object v0 .end method .method public hashCode()I .locals 4 iget-object v0, p0, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object; if-nez v0, :cond_0 const/16 v0, 0x1f return v0 :cond_0 invoke-static {p0}, Lcom/google/gson/JsonPrimitive;->isIntegral(Lcom/google/gson/JsonPrimitive;)Z move-result v0 const/16 v1, 0x20 if-eqz v0, :cond_1 invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsNumber()Ljava/lang/Number; move-result-object v0 invoke-virtual {v0}, Ljava/lang/Number;->longValue()J move-result-wide v2 :goto_0 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/JsonPrimitive;->value:Ljava/lang/Object; instance-of v2, v0, Ljava/lang/Number; if-eqz v2, :cond_2 invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsNumber()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 goto :goto_0 :cond_2 invoke-virtual {v0}, Ljava/lang/Object;->hashCode()I move-result v0 return v0 .end method .method public isBoolean()Z .locals 1 iget-object v0, p0, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object; instance-of v0, v0, Ljava/lang/Boolean; return v0 .end method .method public isNumber()Z .locals 1 iget-object v0, p0, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object; instance-of v0, v0, Ljava/lang/Number; return v0 .end method .method public isString()Z .locals 1 iget-object v0, p0, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object; instance-of v0, v0, Ljava/lang/String; return v0 .end method .method 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 :goto_0 iput-object p1, p0, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object; goto :goto_3 :cond_0 instance-of v0, p1, Ljava/lang/Number; if-nez v0, :cond_2 invoke-static {p1}, Lcom/google/gson/JsonPrimitive;->isPrimitiveOrString(Ljava/lang/Object;)Z move-result v0 if-eqz v0, :cond_1 goto :goto_1 :cond_1 const/4 v0, 0x0 goto :goto_2 :cond_2 :goto_1 const/4 v0, 0x1 :goto_2 invoke-static {v0}, Lcom/google/gson/internal/$Gson$Preconditions;->checkArgument(Z)V goto :goto_0 :goto_3 return-void .end method