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.
324 lines
8.6 KiB
324 lines
8.6 KiB
.class public final Lcom/google/common/primitives/Primitives; |
|
.super Ljava/lang/Object; |
|
.source "Primitives.java" |
|
|
|
|
|
# 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 |
|
|
|
.prologue |
|
const/16 v2, 0x10 |
|
|
|
.line 45 |
|
new-instance v0, Ljava/util/HashMap; |
|
|
|
invoke-direct {v0, v2}, Ljava/util/HashMap;-><init>(I)V |
|
|
|
.line 46 |
|
new-instance v1, Ljava/util/HashMap; |
|
|
|
invoke-direct {v1, v2}, Ljava/util/HashMap;-><init>(I)V |
|
|
|
.line 48 |
|
sget-object v2, Ljava/lang/Boolean;->TYPE:Ljava/lang/Class; |
|
|
|
const-class v3, Ljava/lang/Boolean; |
|
|
|
invoke-static {v0, v1, v2, v3}, Lcom/google/common/primitives/Primitives;->add(Ljava/util/Map;Ljava/util/Map;Ljava/lang/Class;Ljava/lang/Class;)V |
|
|
|
.line 49 |
|
sget-object v2, Ljava/lang/Byte;->TYPE:Ljava/lang/Class; |
|
|
|
const-class v3, Ljava/lang/Byte; |
|
|
|
invoke-static {v0, v1, v2, v3}, Lcom/google/common/primitives/Primitives;->add(Ljava/util/Map;Ljava/util/Map;Ljava/lang/Class;Ljava/lang/Class;)V |
|
|
|
.line 50 |
|
sget-object v2, Ljava/lang/Character;->TYPE:Ljava/lang/Class; |
|
|
|
const-class v3, Ljava/lang/Character; |
|
|
|
invoke-static {v0, v1, v2, v3}, Lcom/google/common/primitives/Primitives;->add(Ljava/util/Map;Ljava/util/Map;Ljava/lang/Class;Ljava/lang/Class;)V |
|
|
|
.line 51 |
|
sget-object v2, Ljava/lang/Double;->TYPE:Ljava/lang/Class; |
|
|
|
const-class v3, Ljava/lang/Double; |
|
|
|
invoke-static {v0, v1, v2, v3}, Lcom/google/common/primitives/Primitives;->add(Ljava/util/Map;Ljava/util/Map;Ljava/lang/Class;Ljava/lang/Class;)V |
|
|
|
.line 52 |
|
sget-object v2, Ljava/lang/Float;->TYPE:Ljava/lang/Class; |
|
|
|
const-class v3, Ljava/lang/Float; |
|
|
|
invoke-static {v0, v1, v2, v3}, Lcom/google/common/primitives/Primitives;->add(Ljava/util/Map;Ljava/util/Map;Ljava/lang/Class;Ljava/lang/Class;)V |
|
|
|
.line 53 |
|
sget-object v2, Ljava/lang/Integer;->TYPE:Ljava/lang/Class; |
|
|
|
const-class v3, Ljava/lang/Integer; |
|
|
|
invoke-static {v0, v1, v2, v3}, Lcom/google/common/primitives/Primitives;->add(Ljava/util/Map;Ljava/util/Map;Ljava/lang/Class;Ljava/lang/Class;)V |
|
|
|
.line 54 |
|
sget-object v2, Ljava/lang/Long;->TYPE:Ljava/lang/Class; |
|
|
|
const-class v3, Ljava/lang/Long; |
|
|
|
invoke-static {v0, v1, v2, v3}, Lcom/google/common/primitives/Primitives;->add(Ljava/util/Map;Ljava/util/Map;Ljava/lang/Class;Ljava/lang/Class;)V |
|
|
|
.line 55 |
|
sget-object v2, Ljava/lang/Short;->TYPE:Ljava/lang/Class; |
|
|
|
const-class v3, Ljava/lang/Short; |
|
|
|
invoke-static {v0, v1, v2, v3}, Lcom/google/common/primitives/Primitives;->add(Ljava/util/Map;Ljava/util/Map;Ljava/lang/Class;Ljava/lang/Class;)V |
|
|
|
.line 56 |
|
sget-object v2, Ljava/lang/Void;->TYPE:Ljava/lang/Class; |
|
|
|
const-class v3, Ljava/lang/Void; |
|
|
|
invoke-static {v0, v1, v2, v3}, Lcom/google/common/primitives/Primitives;->add(Ljava/util/Map;Ljava/util/Map;Ljava/lang/Class;Ljava/lang/Class;)V |
|
|
|
.line 58 |
|
invoke-static {v0}, Ljava/util/Collections;->unmodifiableMap(Ljava/util/Map;)Ljava/util/Map; |
|
|
|
move-result-object v0 |
|
|
|
sput-object v0, Lcom/google/common/primitives/Primitives;->PRIMITIVE_TO_WRAPPER_TYPE:Ljava/util/Map; |
|
|
|
.line 59 |
|
invoke-static {v1}, Ljava/util/Collections;->unmodifiableMap(Ljava/util/Map;)Ljava/util/Map; |
|
|
|
move-result-object v0 |
|
|
|
sput-object v0, Lcom/google/common/primitives/Primitives;->WRAPPER_TO_PRIMITIVE_TYPE:Ljava/util/Map; |
|
|
|
.line 60 |
|
return-void |
|
.end method |
|
|
|
.method private constructor <init>()V |
|
.locals 0 |
|
|
|
.prologue |
|
.line 34 |
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V |
|
|
|
return-void |
|
.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 |
|
|
|
.prologue |
|
.line 64 |
|
invoke-interface {p0, p2, p3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
.line 65 |
|
invoke-interface {p1, p3, p2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
.line 66 |
|
return-void |
|
.end method |
|
|
|
.method public static allPrimitiveTypes()Ljava/util/Set; |
|
.locals 1 |
|
.annotation system Ldalvik/annotation/Signature; |
|
value = { |
|
"()", |
|
"Ljava/util/Set", |
|
"<", |
|
"Ljava/lang/Class", |
|
"<*>;>;" |
|
} |
|
.end annotation |
|
|
|
.prologue |
|
.line 76 |
|
sget-object v0, Lcom/google/common/primitives/Primitives;->PRIMITIVE_TO_WRAPPER_TYPE:Ljava/util/Map; |
|
|
|
invoke-interface {v0}, Ljava/util/Map;->keySet()Ljava/util/Set; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public static allWrapperTypes()Ljava/util/Set; |
|
.locals 1 |
|
.annotation system Ldalvik/annotation/Signature; |
|
value = { |
|
"()", |
|
"Ljava/util/Set", |
|
"<", |
|
"Ljava/lang/Class", |
|
"<*>;>;" |
|
} |
|
.end annotation |
|
|
|
.prologue |
|
.line 86 |
|
sget-object v0, Lcom/google/common/primitives/Primitives;->WRAPPER_TO_PRIMITIVE_TYPE:Ljava/util/Map; |
|
|
|
invoke-interface {v0}, Ljava/util/Map;->keySet()Ljava/util/Set; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public static isWrapperType(Ljava/lang/Class;)Z |
|
.locals 2 |
|
.annotation system Ldalvik/annotation/Signature; |
|
value = { |
|
"(", |
|
"Ljava/lang/Class", |
|
"<*>;)Z" |
|
} |
|
.end annotation |
|
|
|
.prologue |
|
.line 96 |
|
sget-object v0, Lcom/google/common/primitives/Primitives;->WRAPPER_TO_PRIMITIVE_TYPE:Ljava/util/Map; |
|
|
|
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
move-result-object v1 |
|
|
|
invoke-interface {v0, v1}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z |
|
|
|
move-result v0 |
|
|
|
return v0 |
|
.end method |
|
|
|
.method public static unwrap(Ljava/lang/Class;)Ljava/lang/Class; |
|
.locals 1 |
|
.annotation system Ldalvik/annotation/Signature; |
|
value = { |
|
"<T:", |
|
"Ljava/lang/Object;", |
|
">(", |
|
"Ljava/lang/Class", |
|
"<TT;>;)", |
|
"Ljava/lang/Class", |
|
"<TT;>;" |
|
} |
|
.end annotation |
|
|
|
.prologue |
|
.line 127 |
|
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
.line 131 |
|
sget-object v0, Lcom/google/common/primitives/Primitives;->WRAPPER_TO_PRIMITIVE_TYPE:Ljava/util/Map; |
|
|
|
invoke-interface {v0, p0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Ljava/lang/Class; |
|
|
|
.line 132 |
|
if-nez v0, :cond_0 |
|
|
|
:goto_0 |
|
return-object p0 |
|
|
|
:cond_0 |
|
move-object p0, v0 |
|
|
|
goto :goto_0 |
|
.end method |
|
|
|
.method public static wrap(Ljava/lang/Class;)Ljava/lang/Class; |
|
.locals 1 |
|
.annotation system Ldalvik/annotation/Signature; |
|
value = { |
|
"<T:", |
|
"Ljava/lang/Object;", |
|
">(", |
|
"Ljava/lang/Class", |
|
"<TT;>;)", |
|
"Ljava/lang/Class", |
|
"<TT;>;" |
|
} |
|
.end annotation |
|
|
|
.prologue |
|
.line 109 |
|
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
.line 113 |
|
sget-object v0, Lcom/google/common/primitives/Primitives;->PRIMITIVE_TO_WRAPPER_TYPE:Ljava/util/Map; |
|
|
|
invoke-interface {v0, p0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Ljava/lang/Class; |
|
|
|
.line 114 |
|
if-nez v0, :cond_0 |
|
|
|
:goto_0 |
|
return-object p0 |
|
|
|
:cond_0 |
|
move-object p0, v0 |
|
|
|
goto :goto_0 |
|
.end method
|
|
|