apkfuckery/com.discord/smali/com/esotericsoftware/kryo/Registration.smali
2019-02-17 03:24:41 +01:00

204 lines
5.4 KiB
Smali

.class public Lcom/esotericsoftware/kryo/Registration;
.super Ljava/lang/Object;
.source "Registration.java"
# instance fields
.field private final id:I
.field private instantiator:Lorg/b/a/a;
.field private serializer:Lcom/esotericsoftware/kryo/Serializer;
.field private final type:Ljava/lang/Class;
# direct methods
.method public constructor <init>(Ljava/lang/Class;Lcom/esotericsoftware/kryo/Serializer;I)V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
if-eqz p1, :cond_1
if-eqz p2, :cond_0
iput-object p1, p0, Lcom/esotericsoftware/kryo/Registration;->type:Ljava/lang/Class;
iput-object p2, p0, Lcom/esotericsoftware/kryo/Registration;->serializer:Lcom/esotericsoftware/kryo/Serializer;
iput p3, p0, Lcom/esotericsoftware/kryo/Registration;->id:I
return-void
:cond_0
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "serializer cannot be null."
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
:cond_1
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "type cannot be null."
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
# virtual methods
.method public getId()I
.locals 1
iget v0, p0, Lcom/esotericsoftware/kryo/Registration;->id:I
return v0
.end method
.method public getInstantiator()Lorg/b/a/a;
.locals 1
iget-object v0, p0, Lcom/esotericsoftware/kryo/Registration;->instantiator:Lorg/b/a/a;
return-object v0
.end method
.method public getSerializer()Lcom/esotericsoftware/kryo/Serializer;
.locals 1
iget-object v0, p0, Lcom/esotericsoftware/kryo/Registration;->serializer:Lcom/esotericsoftware/kryo/Serializer;
return-object v0
.end method
.method public getType()Ljava/lang/Class;
.locals 1
iget-object v0, p0, Lcom/esotericsoftware/kryo/Registration;->type:Ljava/lang/Class;
return-object v0
.end method
.method public setInstantiator(Lorg/b/a/a;)V
.locals 1
if-eqz p1, :cond_0
iput-object p1, p0, Lcom/esotericsoftware/kryo/Registration;->instantiator:Lorg/b/a/a;
return-void
:cond_0
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string v0, "instantiator cannot be null."
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public setSerializer(Lcom/esotericsoftware/kryo/Serializer;)V
.locals 3
if-eqz p1, :cond_1
iput-object p1, p0, Lcom/esotericsoftware/kryo/Registration;->serializer:Lcom/esotericsoftware/kryo/Serializer;
sget-boolean v0, Lcom/esotericsoftware/a/a;->AG:Z
if-eqz v0, :cond_0
const-string v0, "kryo"
new-instance v1, Ljava/lang/StringBuilder;
const-string v2, "Update registered serializer: "
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
iget-object v2, p0, Lcom/esotericsoftware/kryo/Registration;->type:Ljava/lang/Class;
invoke-virtual {v2}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object v2
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v2, " ("
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object p1
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p1, ")"
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-static {v0, p1}, Lcom/esotericsoftware/a/a;->q(Ljava/lang/String;Ljava/lang/String;)V
:cond_0
return-void
:cond_1
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string v0, "serializer cannot be null."
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public toString()Ljava/lang/String;
.locals 2
new-instance v0, Ljava/lang/StringBuilder;
const-string v1, "["
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
iget v1, p0, Lcom/esotericsoftware/kryo/Registration;->id:I
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string v1, ", "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v1, p0, Lcom/esotericsoftware/kryo/Registration;->type:Ljava/lang/Class;
invoke-static {v1}, Lcom/esotericsoftware/kryo/util/Util;->className(Ljava/lang/Class;)Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v1, "]"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method