2019-02-04 20:05:16 +00:00
|
|
|
.class public Lcom/esotericsoftware/kryo/Registration;
|
|
|
|
.super Ljava/lang/Object;
|
2019-02-04 20:29:01 +00:00
|
|
|
.source "Registration.java"
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field private final id:I
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
.field private instantiator:Lorg/b/a/a;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
.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
|
2019-02-04 20:08:30 +00:00
|
|
|
.locals 0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz p1, :cond_1
|
|
|
|
|
|
|
|
if-eqz p2, :cond_0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iput-object p1, p0, Lcom/esotericsoftware/kryo/Registration;->type:Ljava/lang/Class;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iput-object p2, p0, Lcom/esotericsoftware/kryo/Registration;->serializer:Lcom/esotericsoftware/kryo/Serializer;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iput p3, p0, Lcom/esotericsoftware/kryo/Registration;->id:I
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
return-void
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
:cond_0
|
2019-02-04 20:08:30 +00:00
|
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
const-string p2, "serializer cannot be null."
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
throw p1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
:cond_1
|
2019-02-04 20:08:30 +00:00
|
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
const-string p2, "type cannot be null."
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
throw p1
|
2019-02-04 20:05:16 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public getId()I
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget v0, p0, Lcom/esotericsoftware/kryo/Registration;->id:I
|
|
|
|
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
.method public getInstantiator()Lorg/b/a/a;
|
2019-02-04 20:05:16 +00:00
|
|
|
.locals 1
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iget-object v0, p0, Lcom/esotericsoftware/kryo/Registration;->instantiator:Lorg/b/a/a;
|
2019-02-04 20:05:16 +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
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
.method public setInstantiator(Lorg/b/a/a;)V
|
|
|
|
.locals 1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz p1, :cond_0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iput-object p1, p0, Lcom/esotericsoftware/kryo/Registration;->instantiator:Lorg/b/a/a;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
return-void
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
:cond_0
|
|
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
const-string v0, "instantiator cannot be null."
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
throw p1
|
2019-02-04 20:05:16 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public setSerializer(Lcom/esotericsoftware/kryo/Serializer;)V
|
2019-05-03 18:53:54 +00:00
|
|
|
.locals 2
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz p1, :cond_1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/esotericsoftware/kryo/Registration;->serializer:Lcom/esotericsoftware/kryo/Serializer;
|
|
|
|
|
2019-05-08 22:54:48 +00:00
|
|
|
sget-boolean v0, Lcom/esotericsoftware/a/a;->Ax:Z
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz v0, :cond_0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
const-string v1, "Update registered serializer: "
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
iget-object v1, p0, Lcom/esotericsoftware/kryo/Registration;->type:Ljava/lang/Class;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
invoke-virtual {v1}, Ljava/lang/Class;->getName()Ljava/lang/String;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
move-result-object v1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
const-string v1, " ("
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object p1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {p1}, Ljava/lang/Class;->getName()Ljava/lang/String;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object p1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
const-string p1, ")"
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
move-result-object p1
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
const-string v0, "kryo"
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-static {v0, p1}, Lcom/esotericsoftware/a/a;->q(Ljava/lang/String;Ljava/lang/String;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
:cond_0
|
2019-02-04 20:05:16 +00:00
|
|
|
return-void
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
: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
|
2019-02-04 20:05:16 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public toString()Ljava/lang/String;
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string v1, "["
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
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
|