861 lines
17 KiB
Smali
861 lines
17 KiB
Smali
|
.class public Lcom/esotericsoftware/kryo/util/Util;
|
||
|
.super Ljava/lang/Object;
|
||
|
.source "Util.java"
|
||
|
|
||
|
|
||
|
# static fields
|
||
|
.field public static final IS_ANDROID:Z
|
||
|
|
||
|
.field public static final classAvailabilities:Ljava/util/concurrent/ConcurrentHashMap;
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"Ljava/util/concurrent/ConcurrentHashMap<",
|
||
|
"Ljava/lang/String;",
|
||
|
"Ljava/lang/Boolean;",
|
||
|
">;"
|
||
|
}
|
||
|
.end annotation
|
||
|
.end field
|
||
|
|
||
|
.field public static isAndroid:Z
|
||
|
.annotation runtime Ljava/lang/Deprecated;
|
||
|
.end annotation
|
||
|
.end field
|
||
|
|
||
|
|
||
|
# direct methods
|
||
|
.method public static constructor <clinit>()V
|
||
|
.locals 2
|
||
|
|
||
|
const-string v0, "java.vm.name"
|
||
|
|
||
|
invoke-static {v0}, Ljava/lang/System;->getProperty(Ljava/lang/String;)Ljava/lang/String;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
const-string v1, "Dalvik"
|
||
|
|
||
|
invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
sput-boolean v0, Lcom/esotericsoftware/kryo/util/Util;->IS_ANDROID:Z
|
||
|
|
||
|
sput-boolean v0, Lcom/esotericsoftware/kryo/util/Util;->isAndroid:Z
|
||
|
|
||
|
new-instance v0, Ljava/util/concurrent/ConcurrentHashMap;
|
||
|
|
||
|
invoke-direct {v0}, Ljava/util/concurrent/ConcurrentHashMap;-><init>()V
|
||
|
|
||
|
sput-object v0, Lcom/esotericsoftware/kryo/util/Util;->classAvailabilities:Ljava/util/concurrent/ConcurrentHashMap;
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public constructor <init>()V
|
||
|
.locals 0
|
||
|
|
||
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public static className(Ljava/lang/Class;)Ljava/lang/String;
|
||
|
.locals 4
|
||
|
|
||
|
invoke-virtual {p0}, Ljava/lang/Class;->isArray()Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-eqz v0, :cond_1
|
||
|
|
||
|
invoke-static {p0}, Lcom/esotericsoftware/kryo/util/Util;->getElementClass(Ljava/lang/Class;)Ljava/lang/Class;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
new-instance v1, Ljava/lang/StringBuilder;
|
||
|
|
||
|
const/16 v2, 0x10
|
||
|
|
||
|
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(I)V
|
||
|
|
||
|
const/4 v2, 0x0
|
||
|
|
||
|
invoke-static {p0}, Lcom/esotericsoftware/kryo/util/Util;->getDimensionCount(Ljava/lang/Class;)I
|
||
|
|
||
|
move-result p0
|
||
|
|
||
|
:goto_0
|
||
|
if-ge v2, p0, :cond_0
|
||
|
|
||
|
const-string v3, "[]"
|
||
|
|
||
|
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
add-int/lit8 v2, v2, 0x1
|
||
|
|
||
|
goto :goto_0
|
||
|
|
||
|
:cond_0
|
||
|
new-instance p0, Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-direct {p0}, Ljava/lang/StringBuilder;-><init>()V
|
||
|
|
||
|
invoke-static {v0}, Lcom/esotericsoftware/kryo/util/Util;->className(Ljava/lang/Class;)Ljava/lang/String;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {p0, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-virtual {p0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||
|
|
||
|
move-result-object p0
|
||
|
|
||
|
return-object p0
|
||
|
|
||
|
:cond_1
|
||
|
invoke-virtual {p0}, Ljava/lang/Class;->isPrimitive()Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-nez v0, :cond_3
|
||
|
|
||
|
const-class v0, Ljava/lang/Object;
|
||
|
|
||
|
if-eq p0, v0, :cond_3
|
||
|
|
||
|
const-class v0, Ljava/lang/Boolean;
|
||
|
|
||
|
if-eq p0, v0, :cond_3
|
||
|
|
||
|
const-class v0, Ljava/lang/Byte;
|
||
|
|
||
|
if-eq p0, v0, :cond_3
|
||
|
|
||
|
const-class v0, Ljava/lang/Character;
|
||
|
|
||
|
if-eq p0, v0, :cond_3
|
||
|
|
||
|
const-class v0, Ljava/lang/Short;
|
||
|
|
||
|
if-eq p0, v0, :cond_3
|
||
|
|
||
|
const-class v0, Ljava/lang/Integer;
|
||
|
|
||
|
if-eq p0, v0, :cond_3
|
||
|
|
||
|
const-class v0, Ljava/lang/Long;
|
||
|
|
||
|
if-eq p0, v0, :cond_3
|
||
|
|
||
|
const-class v0, Ljava/lang/Float;
|
||
|
|
||
|
if-eq p0, v0, :cond_3
|
||
|
|
||
|
const-class v0, Ljava/lang/Double;
|
||
|
|
||
|
if-eq p0, v0, :cond_3
|
||
|
|
||
|
const-class v0, Ljava/lang/String;
|
||
|
|
||
|
if-ne p0, v0, :cond_2
|
||
|
|
||
|
goto :goto_1
|
||
|
|
||
|
:cond_2
|
||
|
invoke-virtual {p0}, Ljava/lang/Class;->getName()Ljava/lang/String;
|
||
|
|
||
|
move-result-object p0
|
||
|
|
||
|
return-object p0
|
||
|
|
||
|
:cond_3
|
||
|
:goto_1
|
||
|
invoke-virtual {p0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
|
||
|
|
||
|
move-result-object p0
|
||
|
|
||
|
return-object p0
|
||
|
.end method
|
||
|
|
||
|
.method public static getDimensionCount(Ljava/lang/Class;)I
|
||
|
.locals 1
|
||
|
|
||
|
invoke-virtual {p0}, Ljava/lang/Class;->getComponentType()Ljava/lang/Class;
|
||
|
|
||
|
move-result-object p0
|
||
|
|
||
|
const/4 v0, 0x0
|
||
|
|
||
|
:goto_0
|
||
|
if-eqz p0, :cond_0
|
||
|
|
||
|
add-int/lit8 v0, v0, 0x1
|
||
|
|
||
|
invoke-virtual {p0}, Ljava/lang/Class;->getComponentType()Ljava/lang/Class;
|
||
|
|
||
|
move-result-object p0
|
||
|
|
||
|
goto :goto_0
|
||
|
|
||
|
:cond_0
|
||
|
return v0
|
||
|
.end method
|
||
|
|
||
|
.method public static getElementClass(Ljava/lang/Class;)Ljava/lang/Class;
|
||
|
.locals 1
|
||
|
|
||
|
:goto_0
|
||
|
invoke-virtual {p0}, Ljava/lang/Class;->getComponentType()Ljava/lang/Class;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
if-eqz v0, :cond_0
|
||
|
|
||
|
invoke-virtual {p0}, Ljava/lang/Class;->getComponentType()Ljava/lang/Class;
|
||
|
|
||
|
move-result-object p0
|
||
|
|
||
|
goto :goto_0
|
||
|
|
||
|
:cond_0
|
||
|
return-object p0
|
||
|
.end method
|
||
|
|
||
|
.method public static getPrimitiveClass(Ljava/lang/Class;)Ljava/lang/Class;
|
||
|
.locals 1
|
||
|
|
||
|
const-class v0, Ljava/lang/Integer;
|
||
|
|
||
|
if-ne p0, v0, :cond_0
|
||
|
|
||
|
sget-object p0, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;
|
||
|
|
||
|
return-object p0
|
||
|
|
||
|
:cond_0
|
||
|
const-class v0, Ljava/lang/Float;
|
||
|
|
||
|
if-ne p0, v0, :cond_1
|
||
|
|
||
|
sget-object p0, Ljava/lang/Float;->TYPE:Ljava/lang/Class;
|
||
|
|
||
|
return-object p0
|
||
|
|
||
|
:cond_1
|
||
|
const-class v0, Ljava/lang/Boolean;
|
||
|
|
||
|
if-ne p0, v0, :cond_2
|
||
|
|
||
|
sget-object p0, Ljava/lang/Boolean;->TYPE:Ljava/lang/Class;
|
||
|
|
||
|
return-object p0
|
||
|
|
||
|
:cond_2
|
||
|
const-class v0, Ljava/lang/Long;
|
||
|
|
||
|
if-ne p0, v0, :cond_3
|
||
|
|
||
|
sget-object p0, Ljava/lang/Long;->TYPE:Ljava/lang/Class;
|
||
|
|
||
|
return-object p0
|
||
|
|
||
|
:cond_3
|
||
|
const-class v0, Ljava/lang/Byte;
|
||
|
|
||
|
if-ne p0, v0, :cond_4
|
||
|
|
||
|
sget-object p0, Ljava/lang/Byte;->TYPE:Ljava/lang/Class;
|
||
|
|
||
|
return-object p0
|
||
|
|
||
|
:cond_4
|
||
|
const-class v0, Ljava/lang/Character;
|
||
|
|
||
|
if-ne p0, v0, :cond_5
|
||
|
|
||
|
sget-object p0, Ljava/lang/Character;->TYPE:Ljava/lang/Class;
|
||
|
|
||
|
return-object p0
|
||
|
|
||
|
:cond_5
|
||
|
const-class v0, Ljava/lang/Short;
|
||
|
|
||
|
if-ne p0, v0, :cond_6
|
||
|
|
||
|
sget-object p0, Ljava/lang/Short;->TYPE:Ljava/lang/Class;
|
||
|
|
||
|
return-object p0
|
||
|
|
||
|
:cond_6
|
||
|
const-class v0, Ljava/lang/Double;
|
||
|
|
||
|
if-ne p0, v0, :cond_7
|
||
|
|
||
|
sget-object p0, Ljava/lang/Double;->TYPE:Ljava/lang/Class;
|
||
|
|
||
|
return-object p0
|
||
|
|
||
|
:cond_7
|
||
|
const-class v0, Ljava/lang/Void;
|
||
|
|
||
|
if-ne p0, v0, :cond_8
|
||
|
|
||
|
sget-object p0, Ljava/lang/Void;->TYPE:Ljava/lang/Class;
|
||
|
|
||
|
:cond_8
|
||
|
return-object p0
|
||
|
.end method
|
||
|
|
||
|
.method public static getWrapperClass(Ljava/lang/Class;)Ljava/lang/Class;
|
||
|
.locals 1
|
||
|
|
||
|
sget-object v0, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;
|
||
|
|
||
|
if-ne p0, v0, :cond_0
|
||
|
|
||
|
const-class p0, Ljava/lang/Integer;
|
||
|
|
||
|
return-object p0
|
||
|
|
||
|
:cond_0
|
||
|
sget-object v0, Ljava/lang/Float;->TYPE:Ljava/lang/Class;
|
||
|
|
||
|
if-ne p0, v0, :cond_1
|
||
|
|
||
|
const-class p0, Ljava/lang/Float;
|
||
|
|
||
|
return-object p0
|
||
|
|
||
|
:cond_1
|
||
|
sget-object v0, Ljava/lang/Boolean;->TYPE:Ljava/lang/Class;
|
||
|
|
||
|
if-ne p0, v0, :cond_2
|
||
|
|
||
|
const-class p0, Ljava/lang/Boolean;
|
||
|
|
||
|
return-object p0
|
||
|
|
||
|
:cond_2
|
||
|
sget-object v0, Ljava/lang/Long;->TYPE:Ljava/lang/Class;
|
||
|
|
||
|
if-ne p0, v0, :cond_3
|
||
|
|
||
|
const-class p0, Ljava/lang/Long;
|
||
|
|
||
|
return-object p0
|
||
|
|
||
|
:cond_3
|
||
|
sget-object v0, Ljava/lang/Byte;->TYPE:Ljava/lang/Class;
|
||
|
|
||
|
if-ne p0, v0, :cond_4
|
||
|
|
||
|
const-class p0, Ljava/lang/Byte;
|
||
|
|
||
|
return-object p0
|
||
|
|
||
|
:cond_4
|
||
|
sget-object v0, Ljava/lang/Character;->TYPE:Ljava/lang/Class;
|
||
|
|
||
|
if-ne p0, v0, :cond_5
|
||
|
|
||
|
const-class p0, Ljava/lang/Character;
|
||
|
|
||
|
return-object p0
|
||
|
|
||
|
:cond_5
|
||
|
sget-object v0, Ljava/lang/Short;->TYPE:Ljava/lang/Class;
|
||
|
|
||
|
if-ne p0, v0, :cond_6
|
||
|
|
||
|
const-class p0, Ljava/lang/Short;
|
||
|
|
||
|
return-object p0
|
||
|
|
||
|
:cond_6
|
||
|
sget-object v0, Ljava/lang/Double;->TYPE:Ljava/lang/Class;
|
||
|
|
||
|
if-ne p0, v0, :cond_7
|
||
|
|
||
|
const-class p0, Ljava/lang/Double;
|
||
|
|
||
|
return-object p0
|
||
|
|
||
|
:cond_7
|
||
|
const-class p0, Ljava/lang/Void;
|
||
|
|
||
|
return-object p0
|
||
|
.end method
|
||
|
|
||
|
.method public static isClassAvailable(Ljava/lang/String;)Z
|
||
|
.locals 2
|
||
|
|
||
|
sget-object v0, Lcom/esotericsoftware/kryo/util/Util;->classAvailabilities:Ljava/util/concurrent/ConcurrentHashMap;
|
||
|
|
||
|
invoke-virtual {v0, p0}, Ljava/util/concurrent/ConcurrentHashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
check-cast v0, Ljava/lang/Boolean;
|
||
|
|
||
|
if-nez v0, :cond_0
|
||
|
|
||
|
:try_start_0
|
||
|
invoke-static {p0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
|
||
|
|
||
|
sget-object v0, Ljava/lang/Boolean;->TRUE:Ljava/lang/Boolean;
|
||
|
:try_end_0
|
||
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
||
|
|
||
|
goto :goto_0
|
||
|
|
||
|
:catch_0
|
||
|
new-instance v0, Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
||
|
|
||
|
const-string v1, "Class not available: "
|
||
|
|
||
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
const-string v1, "kryo"
|
||
|
|
||
|
invoke-static {v1, v0}, Lf/f/a/a;->b(Ljava/lang/String;Ljava/lang/String;)V
|
||
|
|
||
|
sget-object v0, Ljava/lang/Boolean;->FALSE:Ljava/lang/Boolean;
|
||
|
|
||
|
:goto_0
|
||
|
sget-object v1, Lcom/esotericsoftware/kryo/util/Util;->classAvailabilities:Ljava/util/concurrent/ConcurrentHashMap;
|
||
|
|
||
|
invoke-virtual {v1, p0, v0}, Ljava/util/concurrent/ConcurrentHashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
|
||
|
:cond_0
|
||
|
invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z
|
||
|
|
||
|
move-result p0
|
||
|
|
||
|
return p0
|
||
|
.end method
|
||
|
|
||
|
.method public static isWrapperClass(Ljava/lang/Class;)Z
|
||
|
.locals 1
|
||
|
|
||
|
const-class v0, Ljava/lang/Integer;
|
||
|
|
||
|
if-eq p0, v0, :cond_1
|
||
|
|
||
|
const-class v0, Ljava/lang/Float;
|
||
|
|
||
|
if-eq p0, v0, :cond_1
|
||
|
|
||
|
const-class v0, Ljava/lang/Boolean;
|
||
|
|
||
|
if-eq p0, v0, :cond_1
|
||
|
|
||
|
const-class v0, Ljava/lang/Long;
|
||
|
|
||
|
if-eq p0, v0, :cond_1
|
||
|
|
||
|
const-class v0, Ljava/lang/Byte;
|
||
|
|
||
|
if-eq p0, v0, :cond_1
|
||
|
|
||
|
const-class v0, Ljava/lang/Character;
|
||
|
|
||
|
if-eq p0, v0, :cond_1
|
||
|
|
||
|
const-class v0, Ljava/lang/Short;
|
||
|
|
||
|
if-eq p0, v0, :cond_1
|
||
|
|
||
|
const-class v0, Ljava/lang/Double;
|
||
|
|
||
|
if-ne p0, v0, :cond_0
|
||
|
|
||
|
goto :goto_0
|
||
|
|
||
|
:cond_0
|
||
|
const/4 p0, 0x0
|
||
|
|
||
|
goto :goto_1
|
||
|
|
||
|
:cond_1
|
||
|
:goto_0
|
||
|
const/4 p0, 0x1
|
||
|
|
||
|
:goto_1
|
||
|
return p0
|
||
|
.end method
|
||
|
|
||
|
.method public static log(Ljava/lang/String;Ljava/lang/Object;)V
|
||
|
.locals 4
|
||
|
|
||
|
const-string v0, "kryo"
|
||
|
|
||
|
if-nez p1, :cond_1
|
||
|
|
||
|
sget-boolean p1, Lf/f/a/a;->d:Z
|
||
|
|
||
|
if-eqz p1, :cond_0
|
||
|
|
||
|
new-instance p1, Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
|
||
|
|
||
|
invoke-virtual {p1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
const-string p0, ": null"
|
||
|
|
||
|
invoke-virtual {p1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||
|
|
||
|
move-result-object p0
|
||
|
|
||
|
invoke-static {v0, p0}, Lf/f/a/a;->c(Ljava/lang/String;Ljava/lang/String;)V
|
||
|
|
||
|
:cond_0
|
||
|
return-void
|
||
|
|
||
|
:cond_1
|
||
|
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v1}, Ljava/lang/Class;->isPrimitive()Z
|
||
|
|
||
|
move-result v2
|
||
|
|
||
|
const-string v3, ": "
|
||
|
|
||
|
if-nez v2, :cond_3
|
||
|
|
||
|
const-class v2, Ljava/lang/Boolean;
|
||
|
|
||
|
if-eq v1, v2, :cond_3
|
||
|
|
||
|
const-class v2, Ljava/lang/Byte;
|
||
|
|
||
|
if-eq v1, v2, :cond_3
|
||
|
|
||
|
const-class v2, Ljava/lang/Character;
|
||
|
|
||
|
if-eq v1, v2, :cond_3
|
||
|
|
||
|
const-class v2, Ljava/lang/Short;
|
||
|
|
||
|
if-eq v1, v2, :cond_3
|
||
|
|
||
|
const-class v2, Ljava/lang/Integer;
|
||
|
|
||
|
if-eq v1, v2, :cond_3
|
||
|
|
||
|
const-class v2, Ljava/lang/Long;
|
||
|
|
||
|
if-eq v1, v2, :cond_3
|
||
|
|
||
|
const-class v2, Ljava/lang/Float;
|
||
|
|
||
|
if-eq v1, v2, :cond_3
|
||
|
|
||
|
const-class v2, Ljava/lang/Double;
|
||
|
|
||
|
if-eq v1, v2, :cond_3
|
||
|
|
||
|
const-class v2, Ljava/lang/String;
|
||
|
|
||
|
if-ne v1, v2, :cond_2
|
||
|
|
||
|
goto :goto_0
|
||
|
|
||
|
:cond_2
|
||
|
invoke-static {p0, v3}, Lf/e/c/a/a;->J(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object p0
|
||
|
|
||
|
invoke-static {p1}, Lcom/esotericsoftware/kryo/util/Util;->string(Ljava/lang/Object;)Ljava/lang/String;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||
|
|
||
|
move-result-object p0
|
||
|
|
||
|
invoke-static {v0, p0}, Lf/f/a/a;->b(Ljava/lang/String;Ljava/lang/String;)V
|
||
|
|
||
|
goto :goto_1
|
||
|
|
||
|
:cond_3
|
||
|
:goto_0
|
||
|
sget-boolean v1, Lf/f/a/a;->d:Z
|
||
|
|
||
|
if-eqz v1, :cond_4
|
||
|
|
||
|
invoke-static {p0, v3}, Lf/e/c/a/a;->J(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object p0
|
||
|
|
||
|
invoke-static {p1}, Lcom/esotericsoftware/kryo/util/Util;->string(Ljava/lang/Object;)Ljava/lang/String;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||
|
|
||
|
move-result-object p0
|
||
|
|
||
|
invoke-static {v0, p0}, Lf/f/a/a;->c(Ljava/lang/String;Ljava/lang/String;)V
|
||
|
|
||
|
:cond_4
|
||
|
:goto_1
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public static string(Ljava/lang/Object;)Ljava/lang/String;
|
||
|
.locals 3
|
||
|
|
||
|
if-nez p0, :cond_0
|
||
|
|
||
|
const-string p0, "null"
|
||
|
|
||
|
return-object p0
|
||
|
|
||
|
:cond_0
|
||
|
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {v0}, Ljava/lang/Class;->isArray()Z
|
||
|
|
||
|
move-result v1
|
||
|
|
||
|
if-eqz v1, :cond_1
|
||
|
|
||
|
invoke-static {v0}, Lcom/esotericsoftware/kryo/util/Util;->className(Ljava/lang/Class;)Ljava/lang/String;
|
||
|
|
||
|
move-result-object p0
|
||
|
|
||
|
return-object p0
|
||
|
|
||
|
:cond_1
|
||
|
:try_start_0
|
||
|
const-string v1, "toString"
|
||
|
|
||
|
const/4 v2, 0x0
|
||
|
|
||
|
new-array v2, v2, [Ljava/lang/Class;
|
||
|
|
||
|
invoke-virtual {v0, v1, v2}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v1}, Ljava/lang/reflect/Method;->getDeclaringClass()Ljava/lang/Class;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
const-class v2, Ljava/lang/Object;
|
||
|
|
||
|
if-ne v1, v2, :cond_3
|
||
|
|
||
|
sget-boolean v1, Lf/f/a/a;->d:Z
|
||
|
|
||
|
if-eqz v1, :cond_2
|
||
|
|
||
|
invoke-static {v0}, Lcom/esotericsoftware/kryo/util/Util;->className(Ljava/lang/Class;)Ljava/lang/String;
|
||
|
|
||
|
move-result-object p0
|
||
|
|
||
|
goto :goto_0
|
||
|
|
||
|
:cond_2
|
||
|
invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
|
||
|
|
||
|
move-result-object p0
|
||
|
:try_end_0
|
||
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
||
|
|
||
|
:goto_0
|
||
|
return-object p0
|
||
|
|
||
|
:catch_0
|
||
|
:cond_3
|
||
|
:try_start_1
|
||
|
invoke-static {p0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
||
|
|
||
|
move-result-object p0
|
||
|
:try_end_1
|
||
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
||
|
|
||
|
return-object p0
|
||
|
|
||
|
:catchall_0
|
||
|
move-exception p0
|
||
|
|
||
|
new-instance v1, Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
||
|
|
||
|
sget-boolean v2, Lf/f/a/a;->d:Z
|
||
|
|
||
|
if-eqz v2, :cond_4
|
||
|
|
||
|
invoke-static {v0}, Lcom/esotericsoftware/kryo/util/Util;->className(Ljava/lang/Class;)Ljava/lang/String;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
goto :goto_1
|
||
|
|
||
|
:cond_4
|
||
|
invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
:goto_1
|
||
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
const-string v0, "(Exception "
|
||
|
|
||
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
const-string p0, " in toString)"
|
||
|
|
||
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||
|
|
||
|
move-result-object p0
|
||
|
|
||
|
return-object p0
|
||
|
.end method
|
||
|
|
||
|
.method public static swapInt(I)I
|
||
|
.locals 2
|
||
|
|
||
|
and-int/lit16 v0, p0, 0xff
|
||
|
|
||
|
shl-int/lit8 v0, v0, 0x18
|
||
|
|
||
|
const v1, 0xff00
|
||
|
|
||
|
and-int/2addr v1, p0
|
||
|
|
||
|
shl-int/lit8 v1, v1, 0x8
|
||
|
|
||
|
or-int/2addr v0, v1
|
||
|
|
||
|
const/high16 v1, 0xff0000
|
||
|
|
||
|
and-int/2addr v1, p0
|
||
|
|
||
|
shr-int/lit8 v1, v1, 0x8
|
||
|
|
||
|
or-int/2addr v0, v1
|
||
|
|
||
|
shr-int/lit8 p0, p0, 0x18
|
||
|
|
||
|
and-int/lit16 p0, p0, 0xff
|
||
|
|
||
|
or-int/2addr p0, v0
|
||
|
|
||
|
return p0
|
||
|
.end method
|
||
|
|
||
|
.method public static swapLong(J)J
|
||
|
.locals 14
|
||
|
|
||
|
const/4 v0, 0x0
|
||
|
|
||
|
shr-long v1, p0, v0
|
||
|
|
||
|
const-wide/16 v3, 0xff
|
||
|
|
||
|
and-long/2addr v1, v3
|
||
|
|
||
|
const/16 v5, 0x38
|
||
|
|
||
|
shl-long/2addr v1, v5
|
||
|
|
||
|
const/16 v6, 0x8
|
||
|
|
||
|
shr-long v7, p0, v6
|
||
|
|
||
|
and-long/2addr v7, v3
|
||
|
|
||
|
const/16 v9, 0x30
|
||
|
|
||
|
shl-long/2addr v7, v9
|
||
|
|
||
|
or-long/2addr v1, v7
|
||
|
|
||
|
const/16 v7, 0x10
|
||
|
|
||
|
shr-long v10, p0, v7
|
||
|
|
||
|
and-long/2addr v10, v3
|
||
|
|
||
|
const/16 v8, 0x28
|
||
|
|
||
|
shl-long/2addr v10, v8
|
||
|
|
||
|
or-long/2addr v1, v10
|
||
|
|
||
|
const/16 v10, 0x18
|
||
|
|
||
|
shr-long v11, p0, v10
|
||
|
|
||
|
and-long/2addr v11, v3
|
||
|
|
||
|
const/16 v13, 0x20
|
||
|
|
||
|
shl-long/2addr v11, v13
|
||
|
|
||
|
or-long/2addr v1, v11
|
||
|
|
||
|
shr-long v11, p0, v13
|
||
|
|
||
|
and-long/2addr v11, v3
|
||
|
|
||
|
shl-long v10, v11, v10
|
||
|
|
||
|
or-long/2addr v1, v10
|
||
|
|
||
|
shr-long v10, p0, v8
|
||
|
|
||
|
and-long/2addr v10, v3
|
||
|
|
||
|
shl-long v7, v10, v7
|
||
|
|
||
|
or-long/2addr v1, v7
|
||
|
|
||
|
shr-long v7, p0, v9
|
||
|
|
||
|
and-long/2addr v7, v3
|
||
|
|
||
|
shl-long v6, v7, v6
|
||
|
|
||
|
or-long/2addr v1, v6
|
||
|
|
||
|
shr-long/2addr p0, v5
|
||
|
|
||
|
and-long/2addr p0, v3
|
||
|
|
||
|
shl-long/2addr p0, v0
|
||
|
|
||
|
or-long/2addr p0, v1
|
||
|
|
||
|
return-wide p0
|
||
|
.end method
|