123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256 |
- .class public final Lcom/google/gson/internal/Primitives;
- .super Ljava/lang/Object;
- .source ""
- # static fields
- .field private static final PRIMITIVE_TO_WRAPPER_TYPE:Ljava/util/Map;
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "Ljava/util/Map<",
- "Ljava/lang/Class<",
- "*>;",
- "Ljava/lang/Class<",
- "*>;>;"
- }
- .end annotation
- .end field
- .field private static final WRAPPER_TO_PRIMITIVE_TYPE:Ljava/util/Map;
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "Ljava/util/Map<",
- "Ljava/lang/Class<",
- "*>;",
- "Ljava/lang/Class<",
- "*>;>;"
- }
- .end annotation
- .end field
- # direct methods
- .method static constructor <clinit>()V
- .locals 4
- new-instance v0, Ljava/util/HashMap;
- const/16 v1, 0x10
- invoke-direct {v0, v1}, Ljava/util/HashMap;-><init>(I)V
- new-instance v2, Ljava/util/HashMap;
- invoke-direct {v2, v1}, Ljava/util/HashMap;-><init>(I)V
- sget-object v1, Ljava/lang/Boolean;->TYPE:Ljava/lang/Class;
- const-class v3, Ljava/lang/Boolean;
- invoke-static {v0, v2, v1, v3}, Lcom/google/gson/internal/Primitives;->add(Ljava/util/Map;Ljava/util/Map;Ljava/lang/Class;Ljava/lang/Class;)V
- sget-object v1, Ljava/lang/Byte;->TYPE:Ljava/lang/Class;
- const-class v3, Ljava/lang/Byte;
- invoke-static {v0, v2, v1, v3}, Lcom/google/gson/internal/Primitives;->add(Ljava/util/Map;Ljava/util/Map;Ljava/lang/Class;Ljava/lang/Class;)V
- sget-object v1, Ljava/lang/Character;->TYPE:Ljava/lang/Class;
- const-class v3, Ljava/lang/Character;
- invoke-static {v0, v2, v1, v3}, Lcom/google/gson/internal/Primitives;->add(Ljava/util/Map;Ljava/util/Map;Ljava/lang/Class;Ljava/lang/Class;)V
- sget-object v1, Ljava/lang/Double;->TYPE:Ljava/lang/Class;
- const-class v3, Ljava/lang/Double;
- invoke-static {v0, v2, v1, v3}, Lcom/google/gson/internal/Primitives;->add(Ljava/util/Map;Ljava/util/Map;Ljava/lang/Class;Ljava/lang/Class;)V
- sget-object v1, Ljava/lang/Float;->TYPE:Ljava/lang/Class;
- const-class v3, Ljava/lang/Float;
- invoke-static {v0, v2, v1, v3}, Lcom/google/gson/internal/Primitives;->add(Ljava/util/Map;Ljava/util/Map;Ljava/lang/Class;Ljava/lang/Class;)V
- sget-object v1, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;
- const-class v3, Ljava/lang/Integer;
- invoke-static {v0, v2, v1, v3}, Lcom/google/gson/internal/Primitives;->add(Ljava/util/Map;Ljava/util/Map;Ljava/lang/Class;Ljava/lang/Class;)V
- sget-object v1, Ljava/lang/Long;->TYPE:Ljava/lang/Class;
- const-class v3, Ljava/lang/Long;
- invoke-static {v0, v2, v1, v3}, Lcom/google/gson/internal/Primitives;->add(Ljava/util/Map;Ljava/util/Map;Ljava/lang/Class;Ljava/lang/Class;)V
- sget-object v1, Ljava/lang/Short;->TYPE:Ljava/lang/Class;
- const-class v3, Ljava/lang/Short;
- invoke-static {v0, v2, v1, v3}, Lcom/google/gson/internal/Primitives;->add(Ljava/util/Map;Ljava/util/Map;Ljava/lang/Class;Ljava/lang/Class;)V
- sget-object v1, Ljava/lang/Void;->TYPE:Ljava/lang/Class;
- const-class v3, Ljava/lang/Void;
- invoke-static {v0, v2, v1, v3}, Lcom/google/gson/internal/Primitives;->add(Ljava/util/Map;Ljava/util/Map;Ljava/lang/Class;Ljava/lang/Class;)V
- invoke-static {v0}, Ljava/util/Collections;->unmodifiableMap(Ljava/util/Map;)Ljava/util/Map;
- move-result-object v0
- sput-object v0, Lcom/google/gson/internal/Primitives;->PRIMITIVE_TO_WRAPPER_TYPE:Ljava/util/Map;
- invoke-static {v2}, Ljava/util/Collections;->unmodifiableMap(Ljava/util/Map;)Ljava/util/Map;
- move-result-object v0
- sput-object v0, Lcom/google/gson/internal/Primitives;->WRAPPER_TO_PRIMITIVE_TYPE:Ljava/util/Map;
- return-void
- .end method
- .method private constructor <init>()V
- .locals 1
- invoke-direct {p0}, Ljava/lang/Object;-><init>()V
- new-instance v0, Ljava/lang/UnsupportedOperationException;
- invoke-direct {v0}, Ljava/lang/UnsupportedOperationException;-><init>()V
- throw v0
- .end method
- .method private static add(Ljava/util/Map;Ljava/util/Map;Ljava/lang/Class;Ljava/lang/Class;)V
- .locals 0
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Ljava/util/Map<",
- "Ljava/lang/Class<",
- "*>;",
- "Ljava/lang/Class<",
- "*>;>;",
- "Ljava/util/Map<",
- "Ljava/lang/Class<",
- "*>;",
- "Ljava/lang/Class<",
- "*>;>;",
- "Ljava/lang/Class<",
- "*>;",
- "Ljava/lang/Class<",
- "*>;)V"
- }
- .end annotation
- invoke-interface {p0, p2, p3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- invoke-interface {p1, p3, p2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- return-void
- .end method
- .method public static isPrimitive(Ljava/lang/reflect/Type;)Z
- .locals 1
- sget-object v0, Lcom/google/gson/internal/Primitives;->PRIMITIVE_TO_WRAPPER_TYPE:Ljava/util/Map;
- invoke-interface {v0, p0}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
- move-result p0
- return p0
- .end method
- .method public static isWrapperType(Ljava/lang/reflect/Type;)Z
- .locals 1
- sget-object v0, Lcom/google/gson/internal/Primitives;->WRAPPER_TO_PRIMITIVE_TYPE:Ljava/util/Map;
- invoke-static {p0}, Lcom/google/gson/internal/$Gson$Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
- move-result-object p0
- invoke-interface {v0, p0}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
- move-result p0
- return p0
- .end method
- .method public static unwrap(Ljava/lang/Class;)Ljava/lang/Class;
- .locals 2
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "<T:",
- "Ljava/lang/Object;",
- ">(",
- "Ljava/lang/Class<",
- "TT;>;)",
- "Ljava/lang/Class<",
- "TT;>;"
- }
- .end annotation
- sget-object v0, Lcom/google/gson/internal/Primitives;->WRAPPER_TO_PRIMITIVE_TYPE:Ljava/util/Map;
- invoke-static {p0}, Lcom/google/gson/internal/$Gson$Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
- move-result-object v1
- invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
- move-result-object v0
- check-cast v0, Ljava/lang/Class;
- if-nez v0, :cond_0
- goto :goto_0
- :cond_0
- move-object p0, v0
- :goto_0
- return-object p0
- .end method
- .method public static wrap(Ljava/lang/Class;)Ljava/lang/Class;
- .locals 2
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "<T:",
- "Ljava/lang/Object;",
- ">(",
- "Ljava/lang/Class<",
- "TT;>;)",
- "Ljava/lang/Class<",
- "TT;>;"
- }
- .end annotation
- sget-object v0, Lcom/google/gson/internal/Primitives;->PRIMITIVE_TO_WRAPPER_TYPE:Ljava/util/Map;
- invoke-static {p0}, Lcom/google/gson/internal/$Gson$Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
- move-result-object v1
- invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
- move-result-object v0
- check-cast v0, Ljava/lang/Class;
- if-nez v0, :cond_0
- goto :goto_0
- :cond_0
- move-object p0, v0
- :goto_0
- return-object p0
- .end method
|