2020-05-17 12:40:10 +00:00
|
|
|
.class public Lcom/esotericsoftware/kryo/Registration;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "Registration.java"
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public final id:I
|
|
|
|
|
2020-07-16 19:51:49 +00:00
|
|
|
.field public instantiator:Lp0/c/a/a;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
.field public serializer:Lcom/esotericsoftware/kryo/Serializer;
|
|
|
|
|
|
|
|
.field public 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
|
|
|
|
|
2020-07-16 19:51:49 +00:00
|
|
|
.method public getInstantiator()Lp0/c/a/a;
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 1
|
|
|
|
|
2020-07-16 19:51:49 +00:00
|
|
|
iget-object v0, p0, Lcom/esotericsoftware/kryo/Registration;->instantiator:Lp0/c/a/a;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2020-07-16 19:51:49 +00:00
|
|
|
.method public setInstantiator(Lp0/c/a/a;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 1
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
2020-07-16 19:51:49 +00:00
|
|
|
iput-object p1, p0, Lcom/esotericsoftware/kryo/Registration;->instantiator:Lp0/c/a/a;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
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 2
|
|
|
|
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/esotericsoftware/kryo/Registration;->serializer:Lcom/esotericsoftware/kryo/Serializer;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
sget-boolean v0, Lf/g/a/a;->d:Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
const-string v0, "Update registered serializer: "
|
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
invoke-static {v0}, Lf/e/b/a/a;->D(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/esotericsoftware/kryo/Registration;->type:Ljava/lang/Class;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Class;->getName()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 {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 {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string p1, ")"
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string v0, "kryo"
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-static {v0, p1}, Lf/g/a/a;->c(Ljava/lang/String;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
: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
|
|
|
|
|
|
|
|
const-string v0, "["
|
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
invoke-static {v0}, Lf/e/b/a/a;->D(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
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
|