apkfuckery/com.discord/smali/com/esotericsoftware/kryo/Kryo.smali

4904 lines
136 KiB
Smali
Raw Normal View History

2019-07-24 11:27:29 +00:00
.class public Lcom/esotericsoftware/kryo/Kryo;
.super Ljava/lang/Object;
.source "Kryo.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/esotericsoftware/kryo/Kryo$DefaultInstantiatorStrategy;,
Lcom/esotericsoftware/kryo/Kryo$DefaultSerializerEntry;
}
.end annotation
# static fields
.field public static final NOT_NULL:B = 0x1t
.field private static final NO_REF:I = -0x2
.field public static final NULL:B = 0x0t
.field private static final REF:I = -0x1
# instance fields
.field private autoReset:Z
.field private classLoader:Ljava/lang/ClassLoader;
.field private final classResolver:Lcom/esotericsoftware/kryo/ClassResolver;
.field private context:Lcom/esotericsoftware/kryo/util/ObjectMap;
.field private copyDepth:I
.field private copyReferences:Z
.field private copyShallow:Z
.field private defaultSerializer:Lcom/esotericsoftware/kryo/factories/SerializerFactory;
.field private final defaultSerializers:Ljava/util/ArrayList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/ArrayList<",
"Lcom/esotericsoftware/kryo/Kryo$DefaultSerializerEntry;",
">;"
}
.end annotation
.end field
.field private depth:I
.field private fieldSerializerConfig:Lcom/esotericsoftware/kryo/serializers/FieldSerializerConfig;
.field private genericsResolver:Lcom/esotericsoftware/kryo/serializers/GenericsResolver;
.field private graphContext:Lcom/esotericsoftware/kryo/util/ObjectMap;
.field private final lowPriorityDefaultSerializerCount:I
.field private maxDepth:I
.field private needsCopyReference:Ljava/lang/Object;
.field private nextRegisterID:I
.field private originalToCopy:Lcom/esotericsoftware/kryo/util/IdentityMap;
.field private readObject:Ljava/lang/Object;
.field private final readReferenceIds:Lcom/esotericsoftware/kryo/util/IntArray;
.field private referenceResolver:Lcom/esotericsoftware/kryo/ReferenceResolver;
.field private references:Z
.field private registrationRequired:Z
.field private strategy:Lorg/b/b/b;
.field private streamFactory:Lcom/esotericsoftware/kryo/StreamFactory;
.field private taggedFieldSerializerConfig:Lcom/esotericsoftware/kryo/serializers/TaggedFieldSerializerConfig;
.field private volatile thread:Ljava/lang/Thread;
.field private warnUnregisteredClasses:Z
# direct methods
.method public constructor <init>()V
.locals 3
new-instance v0, Lcom/esotericsoftware/kryo/util/DefaultClassResolver;
invoke-direct {v0}, Lcom/esotericsoftware/kryo/util/DefaultClassResolver;-><init>()V
new-instance v1, Lcom/esotericsoftware/kryo/util/MapReferenceResolver;
invoke-direct {v1}, Lcom/esotericsoftware/kryo/util/MapReferenceResolver;-><init>()V
new-instance v2, Lcom/esotericsoftware/kryo/util/DefaultStreamFactory;
invoke-direct {v2}, Lcom/esotericsoftware/kryo/util/DefaultStreamFactory;-><init>()V
invoke-direct {p0, v0, v1, v2}, Lcom/esotericsoftware/kryo/Kryo;-><init>(Lcom/esotericsoftware/kryo/ClassResolver;Lcom/esotericsoftware/kryo/ReferenceResolver;Lcom/esotericsoftware/kryo/StreamFactory;)V
return-void
.end method
.method public constructor <init>(Lcom/esotericsoftware/kryo/ClassResolver;Lcom/esotericsoftware/kryo/ReferenceResolver;)V
.locals 1
new-instance v0, Lcom/esotericsoftware/kryo/util/DefaultStreamFactory;
invoke-direct {v0}, Lcom/esotericsoftware/kryo/util/DefaultStreamFactory;-><init>()V
invoke-direct {p0, p1, p2, v0}, Lcom/esotericsoftware/kryo/Kryo;-><init>(Lcom/esotericsoftware/kryo/ClassResolver;Lcom/esotericsoftware/kryo/ReferenceResolver;Lcom/esotericsoftware/kryo/StreamFactory;)V
return-void
.end method
.method public constructor <init>(Lcom/esotericsoftware/kryo/ClassResolver;Lcom/esotericsoftware/kryo/ReferenceResolver;Lcom/esotericsoftware/kryo/StreamFactory;)V
.locals 3
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
new-instance v0, Lcom/esotericsoftware/kryo/factories/ReflectionSerializerFactory;
const-class v1, Lcom/esotericsoftware/kryo/serializers/FieldSerializer;
invoke-direct {v0, v1}, Lcom/esotericsoftware/kryo/factories/ReflectionSerializerFactory;-><init>(Ljava/lang/Class;)V
iput-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->defaultSerializer:Lcom/esotericsoftware/kryo/factories/SerializerFactory;
new-instance v0, Ljava/util/ArrayList;
const/16 v1, 0x21
invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(I)V
iput-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->defaultSerializers:Ljava/util/ArrayList;
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/Class;->getClassLoader()Ljava/lang/ClassLoader;
move-result-object v0
iput-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->classLoader:Ljava/lang/ClassLoader;
new-instance v0, Lcom/esotericsoftware/kryo/Kryo$DefaultInstantiatorStrategy;
invoke-direct {v0}, Lcom/esotericsoftware/kryo/Kryo$DefaultInstantiatorStrategy;-><init>()V
iput-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->strategy:Lorg/b/b/b;
const v0, 0x7fffffff
iput v0, p0, Lcom/esotericsoftware/kryo/Kryo;->maxDepth:I
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
new-instance v1, Lcom/esotericsoftware/kryo/util/IntArray;
const/4 v2, 0x0
invoke-direct {v1, v2}, Lcom/esotericsoftware/kryo/util/IntArray;-><init>(I)V
iput-object v1, p0, Lcom/esotericsoftware/kryo/Kryo;->readReferenceIds:Lcom/esotericsoftware/kryo/util/IntArray;
iput-boolean v0, p0, Lcom/esotericsoftware/kryo/Kryo;->copyReferences:Z
new-instance v1, Lcom/esotericsoftware/kryo/serializers/GenericsResolver;
invoke-direct {v1}, Lcom/esotericsoftware/kryo/serializers/GenericsResolver;-><init>()V
iput-object v1, p0, Lcom/esotericsoftware/kryo/Kryo;->genericsResolver:Lcom/esotericsoftware/kryo/serializers/GenericsResolver;
new-instance v1, Lcom/esotericsoftware/kryo/serializers/FieldSerializerConfig;
invoke-direct {v1}, Lcom/esotericsoftware/kryo/serializers/FieldSerializerConfig;-><init>()V
iput-object v1, p0, Lcom/esotericsoftware/kryo/Kryo;->fieldSerializerConfig:Lcom/esotericsoftware/kryo/serializers/FieldSerializerConfig;
new-instance v1, Lcom/esotericsoftware/kryo/serializers/TaggedFieldSerializerConfig;
invoke-direct {v1}, Lcom/esotericsoftware/kryo/serializers/TaggedFieldSerializerConfig;-><init>()V
iput-object v1, p0, Lcom/esotericsoftware/kryo/Kryo;->taggedFieldSerializerConfig:Lcom/esotericsoftware/kryo/serializers/TaggedFieldSerializerConfig;
if-eqz p1, :cond_1
iput-object p1, p0, Lcom/esotericsoftware/kryo/Kryo;->classResolver:Lcom/esotericsoftware/kryo/ClassResolver;
invoke-interface {p1, p0}, Lcom/esotericsoftware/kryo/ClassResolver;->setKryo(Lcom/esotericsoftware/kryo/Kryo;)V
iput-object p3, p0, Lcom/esotericsoftware/kryo/Kryo;->streamFactory:Lcom/esotericsoftware/kryo/StreamFactory;
invoke-interface {p3, p0}, Lcom/esotericsoftware/kryo/StreamFactory;->setKryo(Lcom/esotericsoftware/kryo/Kryo;)V
iput-object p2, p0, Lcom/esotericsoftware/kryo/Kryo;->referenceResolver:Lcom/esotericsoftware/kryo/ReferenceResolver;
if-eqz p2, :cond_0
invoke-interface {p2, p0}, Lcom/esotericsoftware/kryo/ReferenceResolver;->setKryo(Lcom/esotericsoftware/kryo/Kryo;)V
iput-boolean v0, p0, Lcom/esotericsoftware/kryo/Kryo;->references:Z
:cond_0
const-class p1, [B
const-class p2, Lcom/esotericsoftware/kryo/serializers/DefaultArraySerializers$ByteArraySerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
const-class p1, [C
const-class p2, Lcom/esotericsoftware/kryo/serializers/DefaultArraySerializers$CharArraySerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
const-class p1, [S
const-class p2, Lcom/esotericsoftware/kryo/serializers/DefaultArraySerializers$ShortArraySerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
const-class p1, [I
const-class p2, Lcom/esotericsoftware/kryo/serializers/DefaultArraySerializers$IntArraySerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
const-class p1, [J
const-class p2, Lcom/esotericsoftware/kryo/serializers/DefaultArraySerializers$LongArraySerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
const-class p1, [F
const-class p2, Lcom/esotericsoftware/kryo/serializers/DefaultArraySerializers$FloatArraySerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
const-class p1, [D
const-class p2, Lcom/esotericsoftware/kryo/serializers/DefaultArraySerializers$DoubleArraySerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
const-class p1, [Z
const-class p2, Lcom/esotericsoftware/kryo/serializers/DefaultArraySerializers$BooleanArraySerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
const-class p1, [Ljava/lang/String;
const-class p2, Lcom/esotericsoftware/kryo/serializers/DefaultArraySerializers$StringArraySerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
const-class p1, [Ljava/lang/Object;
const-class p2, Lcom/esotericsoftware/kryo/serializers/DefaultArraySerializers$ObjectArraySerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
const-class p1, Lcom/esotericsoftware/kryo/KryoSerializable;
const-class p2, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$KryoSerializableSerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
const-class p1, Ljava/math/BigInteger;
const-class p2, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$BigIntegerSerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
const-class p1, Ljava/math/BigDecimal;
const-class p2, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$BigDecimalSerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
const-class p1, Ljava/lang/Class;
const-class p2, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$ClassSerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
const-class p1, Ljava/util/Date;
const-class p2, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$DateSerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
const-class p1, Ljava/lang/Enum;
const-class p2, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$EnumSerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
const-class p1, Ljava/util/EnumSet;
const-class p2, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$EnumSetSerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
const-class p1, Ljava/util/Currency;
const-class p2, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$CurrencySerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
const-class p1, Ljava/lang/StringBuffer;
const-class p2, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$StringBufferSerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
const-class p1, Ljava/lang/StringBuilder;
const-class p2, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$StringBuilderSerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
sget-object p1, Ljava/util/Collections;->EMPTY_LIST:Ljava/util/List;
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object p1
const-class p2, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$CollectionsEmptyListSerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
sget-object p1, Ljava/util/Collections;->EMPTY_MAP:Ljava/util/Map;
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object p1
const-class p2, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$CollectionsEmptyMapSerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
sget-object p1, Ljava/util/Collections;->EMPTY_SET:Ljava/util/Set;
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object p1
const-class p2, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$CollectionsEmptySetSerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
const/4 p1, 0x0
invoke-static {p1}, Ljava/util/Collections;->singletonList(Ljava/lang/Object;)Ljava/util/List;
move-result-object p2
invoke-virtual {p2}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object p2
const-class p3, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$CollectionsSingletonListSerializer;
invoke-virtual {p0, p2, p3}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
invoke-static {p1, p1}, Ljava/util/Collections;->singletonMap(Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;
move-result-object p2
invoke-virtual {p2}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object p2
const-class p3, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$CollectionsSingletonMapSerializer;
invoke-virtual {p0, p2, p3}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
invoke-static {p1}, Ljava/util/Collections;->singleton(Ljava/lang/Object;)Ljava/util/Set;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object p1
const-class p2, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$CollectionsSingletonSetSerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
const-class p1, Ljava/util/TreeSet;
const-class p2, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$TreeSetSerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
const-class p1, Ljava/util/Collection;
const-class p2, Lcom/esotericsoftware/kryo/serializers/CollectionSerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
const-class p1, Ljava/util/TreeMap;
const-class p2, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$TreeMapSerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
const-class p1, Ljava/util/Map;
const-class p2, Lcom/esotericsoftware/kryo/serializers/MapSerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
const-class p1, Ljava/util/TimeZone;
const-class p2, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$TimeZoneSerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
const-class p1, Ljava/util/Calendar;
const-class p2, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$CalendarSerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
const-class p1, Ljava/util/Locale;
const-class p2, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$LocaleSerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
const-class p1, Ljava/nio/charset/Charset;
const-class p2, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$CharsetSerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
const-class p1, Ljava/net/URL;
const-class p2, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$URLSerializer;
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
invoke-static {p0}, Lcom/esotericsoftware/kryo/serializers/OptionalSerializers;->addDefaultSerializers(Lcom/esotericsoftware/kryo/Kryo;)V
invoke-static {p0}, Lcom/esotericsoftware/kryo/serializers/TimeSerializers;->addDefaultSerializers(Lcom/esotericsoftware/kryo/Kryo;)V
iget-object p1, p0, Lcom/esotericsoftware/kryo/Kryo;->defaultSerializers:Ljava/util/ArrayList;
invoke-virtual {p1}, Ljava/util/ArrayList;->size()I
move-result p1
iput p1, p0, Lcom/esotericsoftware/kryo/Kryo;->lowPriorityDefaultSerializerCount:I
sget-object p1, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;
new-instance p2, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$IntSerializer;
invoke-direct {p2}, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$IntSerializer;-><init>()V
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->register(Ljava/lang/Class;Lcom/esotericsoftware/kryo/Serializer;)Lcom/esotericsoftware/kryo/Registration;
const-class p1, Ljava/lang/String;
new-instance p2, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$StringSerializer;
invoke-direct {p2}, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$StringSerializer;-><init>()V
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->register(Ljava/lang/Class;Lcom/esotericsoftware/kryo/Serializer;)Lcom/esotericsoftware/kryo/Registration;
sget-object p1, Ljava/lang/Float;->TYPE:Ljava/lang/Class;
new-instance p2, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$FloatSerializer;
invoke-direct {p2}, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$FloatSerializer;-><init>()V
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->register(Ljava/lang/Class;Lcom/esotericsoftware/kryo/Serializer;)Lcom/esotericsoftware/kryo/Registration;
sget-object p1, Ljava/lang/Boolean;->TYPE:Ljava/lang/Class;
new-instance p2, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$BooleanSerializer;
invoke-direct {p2}, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$BooleanSerializer;-><init>()V
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->register(Ljava/lang/Class;Lcom/esotericsoftware/kryo/Serializer;)Lcom/esotericsoftware/kryo/Registration;
sget-object p1, Ljava/lang/Byte;->TYPE:Ljava/lang/Class;
new-instance p2, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$ByteSerializer;
invoke-direct {p2}, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$ByteSerializer;-><init>()V
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->register(Ljava/lang/Class;Lcom/esotericsoftware/kryo/Serializer;)Lcom/esotericsoftware/kryo/Registration;
sget-object p1, Ljava/lang/Character;->TYPE:Ljava/lang/Class;
new-instance p2, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$CharSerializer;
invoke-direct {p2}, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$CharSerializer;-><init>()V
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->register(Ljava/lang/Class;Lcom/esotericsoftware/kryo/Serializer;)Lcom/esotericsoftware/kryo/Registration;
sget-object p1, Ljava/lang/Short;->TYPE:Ljava/lang/Class;
new-instance p2, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$ShortSerializer;
invoke-direct {p2}, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$ShortSerializer;-><init>()V
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->register(Ljava/lang/Class;Lcom/esotericsoftware/kryo/Serializer;)Lcom/esotericsoftware/kryo/Registration;
sget-object p1, Ljava/lang/Long;->TYPE:Ljava/lang/Class;
new-instance p2, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$LongSerializer;
invoke-direct {p2}, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$LongSerializer;-><init>()V
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->register(Ljava/lang/Class;Lcom/esotericsoftware/kryo/Serializer;)Lcom/esotericsoftware/kryo/Registration;
sget-object p1, Ljava/lang/Double;->TYPE:Ljava/lang/Class;
new-instance p2, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$DoubleSerializer;
invoke-direct {p2}, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$DoubleSerializer;-><init>()V
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->register(Ljava/lang/Class;Lcom/esotericsoftware/kryo/Serializer;)Lcom/esotericsoftware/kryo/Registration;
sget-object p1, Ljava/lang/Void;->TYPE:Ljava/lang/Class;
new-instance p2, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$VoidSerializer;
invoke-direct {p2}, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$VoidSerializer;-><init>()V
invoke-virtual {p0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo;->register(Ljava/lang/Class;Lcom/esotericsoftware/kryo/Serializer;)Lcom/esotericsoftware/kryo/Registration;
return-void
:cond_1
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "classResolver cannot be null."
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public constructor <init>(Lcom/esotericsoftware/kryo/ReferenceResolver;)V
.locals 2
new-instance v0, Lcom/esotericsoftware/kryo/util/DefaultClassResolver;
invoke-direct {v0}, Lcom/esotericsoftware/kryo/util/DefaultClassResolver;-><init>()V
new-instance v1, Lcom/esotericsoftware/kryo/util/DefaultStreamFactory;
invoke-direct {v1}, Lcom/esotericsoftware/kryo/util/DefaultStreamFactory;-><init>()V
invoke-direct {p0, v0, p1, v1}, Lcom/esotericsoftware/kryo/Kryo;-><init>(Lcom/esotericsoftware/kryo/ClassResolver;Lcom/esotericsoftware/kryo/ReferenceResolver;Lcom/esotericsoftware/kryo/StreamFactory;)V
return-void
.end method
.method private beginObject()V
.locals 3
sget-boolean v0, Lcom/esotericsoftware/a/a;->DEBUG:Z
if-eqz v0, :cond_2
iget v0, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez v0, :cond_0
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
move-result-object v0
iput-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->thread:Ljava/lang/Thread;
goto :goto_0
:cond_0
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->thread:Ljava/lang/Thread;
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
move-result-object v1
if-ne v0, v1, :cond_1
goto :goto_0
:cond_1
new-instance v0, Ljava/util/ConcurrentModificationException;
const-string v1, "Kryo must not be accessed concurrently by multiple threads."
invoke-direct {v0, v1}, Ljava/util/ConcurrentModificationException;-><init>(Ljava/lang/String;)V
throw v0
:cond_2
:goto_0
iget v0, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
iget v1, p0, Lcom/esotericsoftware/kryo/Kryo;->maxDepth:I
if-eq v0, v1, :cond_3
add-int/lit8 v0, v0, 0x1
iput v0, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
return-void
:cond_3
new-instance v0, Lcom/esotericsoftware/kryo/KryoException;
new-instance v1, Ljava/lang/StringBuilder;
const-string v2, "Max depth exceeded: "
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
iget v2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Lcom/esotericsoftware/kryo/KryoException;-><init>(Ljava/lang/String;)V
throw v0
.end method
# virtual methods
.method public addDefaultSerializer(Ljava/lang/Class;Lcom/esotericsoftware/kryo/Serializer;)V
.locals 2
if-eqz p1, :cond_1
if-eqz p2, :cond_0
new-instance v0, Lcom/esotericsoftware/kryo/Kryo$DefaultSerializerEntry;
new-instance v1, Lcom/esotericsoftware/kryo/factories/PseudoSerializerFactory;
invoke-direct {v1, p2}, Lcom/esotericsoftware/kryo/factories/PseudoSerializerFactory;-><init>(Lcom/esotericsoftware/kryo/Serializer;)V
invoke-direct {v0, p1, v1}, Lcom/esotericsoftware/kryo/Kryo$DefaultSerializerEntry;-><init>(Ljava/lang/Class;Lcom/esotericsoftware/kryo/factories/SerializerFactory;)V
iget-object p1, p0, Lcom/esotericsoftware/kryo/Kryo;->defaultSerializers:Ljava/util/ArrayList;
invoke-virtual {p1}, Ljava/util/ArrayList;->size()I
move-result p2
iget v1, p0, Lcom/esotericsoftware/kryo/Kryo;->lowPriorityDefaultSerializerCount:I
sub-int/2addr p2, v1
invoke-virtual {p1, p2, v0}, Ljava/util/ArrayList;->add(ILjava/lang/Object;)V
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
.method public addDefaultSerializer(Ljava/lang/Class;Lcom/esotericsoftware/kryo/factories/SerializerFactory;)V
.locals 2
if-eqz p1, :cond_1
if-eqz p2, :cond_0
new-instance v0, Lcom/esotericsoftware/kryo/Kryo$DefaultSerializerEntry;
invoke-direct {v0, p1, p2}, Lcom/esotericsoftware/kryo/Kryo$DefaultSerializerEntry;-><init>(Ljava/lang/Class;Lcom/esotericsoftware/kryo/factories/SerializerFactory;)V
iget-object p1, p0, Lcom/esotericsoftware/kryo/Kryo;->defaultSerializers:Ljava/util/ArrayList;
invoke-virtual {p1}, Ljava/util/ArrayList;->size()I
move-result p2
iget v1, p0, Lcom/esotericsoftware/kryo/Kryo;->lowPriorityDefaultSerializerCount:I
sub-int/2addr p2, v1
invoke-virtual {p1, p2, v0}, Ljava/util/ArrayList;->add(ILjava/lang/Object;)V
return-void
:cond_0
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "serializerFactory 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
.method public addDefaultSerializer(Ljava/lang/Class;Ljava/lang/Class;)V
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Class;",
"Ljava/lang/Class<",
"+",
"Lcom/esotericsoftware/kryo/Serializer;",
">;)V"
}
.end annotation
if-eqz p1, :cond_1
if-eqz p2, :cond_0
new-instance v0, Lcom/esotericsoftware/kryo/Kryo$DefaultSerializerEntry;
new-instance v1, Lcom/esotericsoftware/kryo/factories/ReflectionSerializerFactory;
invoke-direct {v1, p2}, Lcom/esotericsoftware/kryo/factories/ReflectionSerializerFactory;-><init>(Ljava/lang/Class;)V
invoke-direct {v0, p1, v1}, Lcom/esotericsoftware/kryo/Kryo$DefaultSerializerEntry;-><init>(Ljava/lang/Class;Lcom/esotericsoftware/kryo/factories/SerializerFactory;)V
iget-object p1, p0, Lcom/esotericsoftware/kryo/Kryo;->defaultSerializers:Ljava/util/ArrayList;
invoke-virtual {p1}, Ljava/util/ArrayList;->size()I
move-result p2
iget v1, p0, Lcom/esotericsoftware/kryo/Kryo;->lowPriorityDefaultSerializerCount:I
sub-int/2addr p2, v1
invoke-virtual {p1, p2, v0}, Ljava/util/ArrayList;->add(ILjava/lang/Object;)V
return-void
:cond_0
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "serializerClass 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
.method public copy(Ljava/lang/Object;)Ljava/lang/Object;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(TT;)TT;"
}
.end annotation
if-nez p1, :cond_0
const/4 p1, 0x0
return-object p1
:cond_0
iget-boolean v0, p0, Lcom/esotericsoftware/kryo/Kryo;->copyShallow:Z
if-eqz v0, :cond_1
return-object p1
:cond_1
iget v0, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
const/4 v1, 0x1
add-int/2addr v0, v1
iput v0, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
:try_start_0
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->originalToCopy:Lcom/esotericsoftware/kryo/util/IdentityMap;
if-nez v0, :cond_2
new-instance v0, Lcom/esotericsoftware/kryo/util/IdentityMap;
invoke-direct {v0}, Lcom/esotericsoftware/kryo/util/IdentityMap;-><init>()V
iput-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->originalToCopy:Lcom/esotericsoftware/kryo/util/IdentityMap;
:cond_2
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->originalToCopy:Lcom/esotericsoftware/kryo/util/IdentityMap;
invoke-virtual {v0, p1}, Lcom/esotericsoftware/kryo/util/IdentityMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-eqz v0, :cond_4
iget p1, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
sub-int/2addr p1, v1
iput p1, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
if-nez p1, :cond_3
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_3
return-object v0
:cond_4
:try_start_1
iget-boolean v0, p0, Lcom/esotericsoftware/kryo/Kryo;->copyReferences:Z
if-eqz v0, :cond_5
iput-object p1, p0, Lcom/esotericsoftware/kryo/Kryo;->needsCopyReference:Ljava/lang/Object;
:cond_5
instance-of v0, p1, Lcom/esotericsoftware/kryo/KryoCopyable;
if-eqz v0, :cond_6
check-cast p1, Lcom/esotericsoftware/kryo/KryoCopyable;
invoke-interface {p1, p0}, Lcom/esotericsoftware/kryo/KryoCopyable;->copy(Lcom/esotericsoftware/kryo/Kryo;)Ljava/lang/Object;
move-result-object p1
goto :goto_0
:cond_6
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v0
invoke-virtual {p0, v0}, Lcom/esotericsoftware/kryo/Kryo;->getSerializer(Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Serializer;
move-result-object v0
invoke-virtual {v0, p0, p1}, Lcom/esotericsoftware/kryo/Serializer;->copy(Lcom/esotericsoftware/kryo/Kryo;Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
:goto_0
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->needsCopyReference:Ljava/lang/Object;
if-eqz v0, :cond_7
invoke-virtual {p0, p1}, Lcom/esotericsoftware/kryo/Kryo;->reference(Ljava/lang/Object;)V
:cond_7
2019-10-09 23:16:36 +00:00
sget-boolean v0, Lcom/esotericsoftware/a/a;->FL:Z
2019-07-24 11:27:29 +00:00
if-nez v0, :cond_8
sget-boolean v0, Lcom/esotericsoftware/a/a;->DEBUG:Z
if-eqz v0, :cond_9
iget v0, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
if-ne v0, v1, :cond_9
:cond_8
const-string v0, "Copy"
invoke-static {v0, p1}, Lcom/esotericsoftware/kryo/util/Util;->log(Ljava/lang/String;Ljava/lang/Object;)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:cond_9
iget v0, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
sub-int/2addr v0, v1
iput v0, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
if-nez v0, :cond_a
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_a
return-object p1
:catchall_0
move-exception p1
iget v0, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
sub-int/2addr v0, v1
iput v0, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
if-nez v0, :cond_b
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_b
throw p1
.end method
.method public copy(Ljava/lang/Object;Lcom/esotericsoftware/kryo/Serializer;)Ljava/lang/Object;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(TT;",
"Lcom/esotericsoftware/kryo/Serializer;",
")TT;"
}
.end annotation
if-nez p1, :cond_0
const/4 p1, 0x0
return-object p1
:cond_0
iget-boolean v0, p0, Lcom/esotericsoftware/kryo/Kryo;->copyShallow:Z
if-eqz v0, :cond_1
return-object p1
:cond_1
iget v0, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
const/4 v1, 0x1
add-int/2addr v0, v1
iput v0, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
:try_start_0
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->originalToCopy:Lcom/esotericsoftware/kryo/util/IdentityMap;
if-nez v0, :cond_2
new-instance v0, Lcom/esotericsoftware/kryo/util/IdentityMap;
invoke-direct {v0}, Lcom/esotericsoftware/kryo/util/IdentityMap;-><init>()V
iput-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->originalToCopy:Lcom/esotericsoftware/kryo/util/IdentityMap;
:cond_2
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->originalToCopy:Lcom/esotericsoftware/kryo/util/IdentityMap;
invoke-virtual {v0, p1}, Lcom/esotericsoftware/kryo/util/IdentityMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-eqz v0, :cond_4
iget p1, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
sub-int/2addr p1, v1
iput p1, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
if-nez p1, :cond_3
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_3
return-object v0
:cond_4
:try_start_1
iget-boolean v0, p0, Lcom/esotericsoftware/kryo/Kryo;->copyReferences:Z
if-eqz v0, :cond_5
iput-object p1, p0, Lcom/esotericsoftware/kryo/Kryo;->needsCopyReference:Ljava/lang/Object;
:cond_5
instance-of v0, p1, Lcom/esotericsoftware/kryo/KryoCopyable;
if-eqz v0, :cond_6
check-cast p1, Lcom/esotericsoftware/kryo/KryoCopyable;
invoke-interface {p1, p0}, Lcom/esotericsoftware/kryo/KryoCopyable;->copy(Lcom/esotericsoftware/kryo/Kryo;)Ljava/lang/Object;
move-result-object p1
goto :goto_0
:cond_6
invoke-virtual {p2, p0, p1}, Lcom/esotericsoftware/kryo/Serializer;->copy(Lcom/esotericsoftware/kryo/Kryo;Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
:goto_0
iget-object p2, p0, Lcom/esotericsoftware/kryo/Kryo;->needsCopyReference:Ljava/lang/Object;
if-eqz p2, :cond_7
invoke-virtual {p0, p1}, Lcom/esotericsoftware/kryo/Kryo;->reference(Ljava/lang/Object;)V
:cond_7
2019-10-09 23:16:36 +00:00
sget-boolean p2, Lcom/esotericsoftware/a/a;->FL:Z
2019-07-24 11:27:29 +00:00
if-nez p2, :cond_8
sget-boolean p2, Lcom/esotericsoftware/a/a;->DEBUG:Z
if-eqz p2, :cond_9
iget p2, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
if-ne p2, v1, :cond_9
:cond_8
const-string p2, "Copy"
invoke-static {p2, p1}, Lcom/esotericsoftware/kryo/util/Util;->log(Ljava/lang/String;Ljava/lang/Object;)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:cond_9
iget p2, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
sub-int/2addr p2, v1
iput p2, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
if-nez p2, :cond_a
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_a
return-object p1
:catchall_0
move-exception p1
iget p2, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
sub-int/2addr p2, v1
iput p2, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
if-nez p2, :cond_b
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_b
throw p1
.end method
.method public copyShallow(Ljava/lang/Object;)Ljava/lang/Object;
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(TT;)TT;"
}
.end annotation
if-nez p1, :cond_0
const/4 p1, 0x0
return-object p1
:cond_0
iget v0, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
const/4 v1, 0x1
add-int/2addr v0, v1
iput v0, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
iput-boolean v1, p0, Lcom/esotericsoftware/kryo/Kryo;->copyShallow:Z
const/4 v0, 0x0
:try_start_0
iget-object v2, p0, Lcom/esotericsoftware/kryo/Kryo;->originalToCopy:Lcom/esotericsoftware/kryo/util/IdentityMap;
if-nez v2, :cond_1
new-instance v2, Lcom/esotericsoftware/kryo/util/IdentityMap;
invoke-direct {v2}, Lcom/esotericsoftware/kryo/util/IdentityMap;-><init>()V
iput-object v2, p0, Lcom/esotericsoftware/kryo/Kryo;->originalToCopy:Lcom/esotericsoftware/kryo/util/IdentityMap;
:cond_1
iget-object v2, p0, Lcom/esotericsoftware/kryo/Kryo;->originalToCopy:Lcom/esotericsoftware/kryo/util/IdentityMap;
invoke-virtual {v2, p1}, Lcom/esotericsoftware/kryo/util/IdentityMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v2
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-eqz v2, :cond_3
iput-boolean v0, p0, Lcom/esotericsoftware/kryo/Kryo;->copyShallow:Z
iget p1, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
sub-int/2addr p1, v1
iput p1, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
if-nez p1, :cond_2
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_2
return-object v2
:cond_3
:try_start_1
iget-boolean v2, p0, Lcom/esotericsoftware/kryo/Kryo;->copyReferences:Z
if-eqz v2, :cond_4
iput-object p1, p0, Lcom/esotericsoftware/kryo/Kryo;->needsCopyReference:Ljava/lang/Object;
:cond_4
instance-of v2, p1, Lcom/esotericsoftware/kryo/KryoCopyable;
if-eqz v2, :cond_5
check-cast p1, Lcom/esotericsoftware/kryo/KryoCopyable;
invoke-interface {p1, p0}, Lcom/esotericsoftware/kryo/KryoCopyable;->copy(Lcom/esotericsoftware/kryo/Kryo;)Ljava/lang/Object;
move-result-object p1
goto :goto_0
:cond_5
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v2
invoke-virtual {p0, v2}, Lcom/esotericsoftware/kryo/Kryo;->getSerializer(Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Serializer;
move-result-object v2
invoke-virtual {v2, p0, p1}, Lcom/esotericsoftware/kryo/Serializer;->copy(Lcom/esotericsoftware/kryo/Kryo;Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
:goto_0
iget-object v2, p0, Lcom/esotericsoftware/kryo/Kryo;->needsCopyReference:Ljava/lang/Object;
if-eqz v2, :cond_6
invoke-virtual {p0, p1}, Lcom/esotericsoftware/kryo/Kryo;->reference(Ljava/lang/Object;)V
:cond_6
2019-10-09 23:16:36 +00:00
sget-boolean v2, Lcom/esotericsoftware/a/a;->FL:Z
2019-07-24 11:27:29 +00:00
if-nez v2, :cond_7
sget-boolean v2, Lcom/esotericsoftware/a/a;->DEBUG:Z
if-eqz v2, :cond_8
iget v2, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
if-ne v2, v1, :cond_8
:cond_7
const-string v2, "Shallow copy"
invoke-static {v2, p1}, Lcom/esotericsoftware/kryo/util/Util;->log(Ljava/lang/String;Ljava/lang/Object;)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:cond_8
iput-boolean v0, p0, Lcom/esotericsoftware/kryo/Kryo;->copyShallow:Z
iget v0, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
sub-int/2addr v0, v1
iput v0, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
if-nez v0, :cond_9
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_9
return-object p1
:catchall_0
move-exception p1
iput-boolean v0, p0, Lcom/esotericsoftware/kryo/Kryo;->copyShallow:Z
iget v0, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
sub-int/2addr v0, v1
iput v0, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
if-nez v0, :cond_a
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_a
throw p1
.end method
.method public copyShallow(Ljava/lang/Object;Lcom/esotericsoftware/kryo/Serializer;)Ljava/lang/Object;
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(TT;",
"Lcom/esotericsoftware/kryo/Serializer;",
")TT;"
}
.end annotation
if-nez p1, :cond_0
const/4 p1, 0x0
return-object p1
:cond_0
iget v0, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
const/4 v1, 0x1
add-int/2addr v0, v1
iput v0, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
iput-boolean v1, p0, Lcom/esotericsoftware/kryo/Kryo;->copyShallow:Z
const/4 v0, 0x0
:try_start_0
iget-object v2, p0, Lcom/esotericsoftware/kryo/Kryo;->originalToCopy:Lcom/esotericsoftware/kryo/util/IdentityMap;
if-nez v2, :cond_1
new-instance v2, Lcom/esotericsoftware/kryo/util/IdentityMap;
invoke-direct {v2}, Lcom/esotericsoftware/kryo/util/IdentityMap;-><init>()V
iput-object v2, p0, Lcom/esotericsoftware/kryo/Kryo;->originalToCopy:Lcom/esotericsoftware/kryo/util/IdentityMap;
:cond_1
iget-object v2, p0, Lcom/esotericsoftware/kryo/Kryo;->originalToCopy:Lcom/esotericsoftware/kryo/util/IdentityMap;
invoke-virtual {v2, p1}, Lcom/esotericsoftware/kryo/util/IdentityMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v2
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-eqz v2, :cond_3
iput-boolean v0, p0, Lcom/esotericsoftware/kryo/Kryo;->copyShallow:Z
iget p1, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
sub-int/2addr p1, v1
iput p1, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
if-nez p1, :cond_2
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_2
return-object v2
:cond_3
:try_start_1
iget-boolean v2, p0, Lcom/esotericsoftware/kryo/Kryo;->copyReferences:Z
if-eqz v2, :cond_4
iput-object p1, p0, Lcom/esotericsoftware/kryo/Kryo;->needsCopyReference:Ljava/lang/Object;
:cond_4
instance-of v2, p1, Lcom/esotericsoftware/kryo/KryoCopyable;
if-eqz v2, :cond_5
check-cast p1, Lcom/esotericsoftware/kryo/KryoCopyable;
invoke-interface {p1, p0}, Lcom/esotericsoftware/kryo/KryoCopyable;->copy(Lcom/esotericsoftware/kryo/Kryo;)Ljava/lang/Object;
move-result-object p1
goto :goto_0
:cond_5
invoke-virtual {p2, p0, p1}, Lcom/esotericsoftware/kryo/Serializer;->copy(Lcom/esotericsoftware/kryo/Kryo;Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
:goto_0
iget-object p2, p0, Lcom/esotericsoftware/kryo/Kryo;->needsCopyReference:Ljava/lang/Object;
if-eqz p2, :cond_6
invoke-virtual {p0, p1}, Lcom/esotericsoftware/kryo/Kryo;->reference(Ljava/lang/Object;)V
:cond_6
2019-10-09 23:16:36 +00:00
sget-boolean p2, Lcom/esotericsoftware/a/a;->FL:Z
2019-07-24 11:27:29 +00:00
if-nez p2, :cond_7
sget-boolean p2, Lcom/esotericsoftware/a/a;->DEBUG:Z
if-eqz p2, :cond_8
iget p2, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
if-ne p2, v1, :cond_8
:cond_7
const-string p2, "Shallow copy"
invoke-static {p2, p1}, Lcom/esotericsoftware/kryo/util/Util;->log(Ljava/lang/String;Ljava/lang/Object;)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:cond_8
iput-boolean v0, p0, Lcom/esotericsoftware/kryo/Kryo;->copyShallow:Z
iget p2, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
sub-int/2addr p2, v1
iput p2, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
if-nez p2, :cond_9
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_9
return-object p1
:catchall_0
move-exception p1
iput-boolean v0, p0, Lcom/esotericsoftware/kryo/Kryo;->copyShallow:Z
iget p2, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
sub-int/2addr p2, v1
iput p2, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
if-nez p2, :cond_a
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_a
throw p1
.end method
.method public getAsmEnabled()Z
.locals 1
.annotation runtime Ljava/lang/Deprecated;
.end annotation
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->fieldSerializerConfig:Lcom/esotericsoftware/kryo/serializers/FieldSerializerConfig;
invoke-virtual {v0}, Lcom/esotericsoftware/kryo/serializers/FieldSerializerConfig;->isUseAsm()Z
move-result v0
return v0
.end method
.method public getClassLoader()Ljava/lang/ClassLoader;
.locals 1
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->classLoader:Ljava/lang/ClassLoader;
return-object v0
.end method
.method public getClassResolver()Lcom/esotericsoftware/kryo/ClassResolver;
.locals 1
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->classResolver:Lcom/esotericsoftware/kryo/ClassResolver;
return-object v0
.end method
.method public getContext()Lcom/esotericsoftware/kryo/util/ObjectMap;
.locals 1
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->context:Lcom/esotericsoftware/kryo/util/ObjectMap;
if-nez v0, :cond_0
new-instance v0, Lcom/esotericsoftware/kryo/util/ObjectMap;
invoke-direct {v0}, Lcom/esotericsoftware/kryo/util/ObjectMap;-><init>()V
iput-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->context:Lcom/esotericsoftware/kryo/util/ObjectMap;
:cond_0
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->context:Lcom/esotericsoftware/kryo/util/ObjectMap;
return-object v0
.end method
.method public getDefaultSerializer(Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Serializer;
.locals 4
if-eqz p1, :cond_3
invoke-virtual {p0, p1}, Lcom/esotericsoftware/kryo/Kryo;->getDefaultSerializerForAnnotatedType(Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Serializer;
move-result-object v0
if-eqz v0, :cond_0
return-object v0
:cond_0
const/4 v0, 0x0
iget-object v1, p0, Lcom/esotericsoftware/kryo/Kryo;->defaultSerializers:Ljava/util/ArrayList;
invoke-virtual {v1}, Ljava/util/ArrayList;->size()I
move-result v1
:goto_0
if-ge v0, v1, :cond_2
iget-object v2, p0, Lcom/esotericsoftware/kryo/Kryo;->defaultSerializers:Ljava/util/ArrayList;
invoke-virtual {v2, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/esotericsoftware/kryo/Kryo$DefaultSerializerEntry;
iget-object v3, v2, Lcom/esotericsoftware/kryo/Kryo$DefaultSerializerEntry;->type:Ljava/lang/Class;
invoke-virtual {v3, p1}, Ljava/lang/Class;->isAssignableFrom(Ljava/lang/Class;)Z
move-result v3
if-eqz v3, :cond_1
iget-object v0, v2, Lcom/esotericsoftware/kryo/Kryo$DefaultSerializerEntry;->serializerFactory:Lcom/esotericsoftware/kryo/factories/SerializerFactory;
invoke-interface {v0, p0, p1}, Lcom/esotericsoftware/kryo/factories/SerializerFactory;->makeSerializer(Lcom/esotericsoftware/kryo/Kryo;Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Serializer;
move-result-object p1
return-object p1
:cond_1
add-int/lit8 v0, v0, 0x1
goto :goto_0
:cond_2
invoke-virtual {p0, p1}, Lcom/esotericsoftware/kryo/Kryo;->newDefaultSerializer(Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Serializer;
move-result-object p1
return-object p1
:cond_3
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string v0, "type cannot be null."
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
goto :goto_2
:goto_1
throw p1
:goto_2
goto :goto_1
.end method
.method protected getDefaultSerializerForAnnotatedType(Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Serializer;
.locals 1
const-class v0, Lcom/esotericsoftware/kryo/DefaultSerializer;
invoke-virtual {p1, v0}, Ljava/lang/Class;->isAnnotationPresent(Ljava/lang/Class;)Z
move-result v0
if-eqz v0, :cond_0
const-class v0, Lcom/esotericsoftware/kryo/DefaultSerializer;
invoke-virtual {p1, v0}, Ljava/lang/Class;->getAnnotation(Ljava/lang/Class;)Ljava/lang/annotation/Annotation;
move-result-object v0
check-cast v0, Lcom/esotericsoftware/kryo/DefaultSerializer;
invoke-interface {v0}, Lcom/esotericsoftware/kryo/DefaultSerializer;->value()Ljava/lang/Class;
move-result-object v0
invoke-static {p0, v0, p1}, Lcom/esotericsoftware/kryo/factories/ReflectionSerializerFactory;->makeSerializer(Lcom/esotericsoftware/kryo/Kryo;Ljava/lang/Class;Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Serializer;
move-result-object p1
return-object p1
:cond_0
const/4 p1, 0x0
return-object p1
.end method
.method public getDepth()I
.locals 1
iget v0, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
return v0
.end method
.method public getFieldSerializerConfig()Lcom/esotericsoftware/kryo/serializers/FieldSerializerConfig;
.locals 1
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->fieldSerializerConfig:Lcom/esotericsoftware/kryo/serializers/FieldSerializerConfig;
return-object v0
.end method
.method public getGenericsResolver()Lcom/esotericsoftware/kryo/serializers/GenericsResolver;
.locals 1
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->genericsResolver:Lcom/esotericsoftware/kryo/serializers/GenericsResolver;
return-object v0
.end method
.method public getGraphContext()Lcom/esotericsoftware/kryo/util/ObjectMap;
.locals 1
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->graphContext:Lcom/esotericsoftware/kryo/util/ObjectMap;
if-nez v0, :cond_0
new-instance v0, Lcom/esotericsoftware/kryo/util/ObjectMap;
invoke-direct {v0}, Lcom/esotericsoftware/kryo/util/ObjectMap;-><init>()V
iput-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->graphContext:Lcom/esotericsoftware/kryo/util/ObjectMap;
:cond_0
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->graphContext:Lcom/esotericsoftware/kryo/util/ObjectMap;
return-object v0
.end method
.method public getInstantiatorStrategy()Lorg/b/b/b;
.locals 1
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->strategy:Lorg/b/b/b;
return-object v0
.end method
.method public getNextRegistrationId()I
.locals 2
:goto_0
iget v0, p0, Lcom/esotericsoftware/kryo/Kryo;->nextRegisterID:I
const/4 v1, -0x2
if-eq v0, v1, :cond_1
iget-object v1, p0, Lcom/esotericsoftware/kryo/Kryo;->classResolver:Lcom/esotericsoftware/kryo/ClassResolver;
invoke-interface {v1, v0}, Lcom/esotericsoftware/kryo/ClassResolver;->getRegistration(I)Lcom/esotericsoftware/kryo/Registration;
move-result-object v0
if-nez v0, :cond_0
iget v0, p0, Lcom/esotericsoftware/kryo/Kryo;->nextRegisterID:I
return v0
:cond_0
iget v0, p0, Lcom/esotericsoftware/kryo/Kryo;->nextRegisterID:I
add-int/lit8 v0, v0, 0x1
iput v0, p0, Lcom/esotericsoftware/kryo/Kryo;->nextRegisterID:I
goto :goto_0
:cond_1
new-instance v0, Lcom/esotericsoftware/kryo/KryoException;
const-string v1, "No registration IDs are available."
invoke-direct {v0, v1}, Lcom/esotericsoftware/kryo/KryoException;-><init>(Ljava/lang/String;)V
goto :goto_2
:goto_1
throw v0
:goto_2
goto :goto_1
.end method
.method public getOriginalToCopyMap()Lcom/esotericsoftware/kryo/util/IdentityMap;
.locals 1
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->originalToCopy:Lcom/esotericsoftware/kryo/util/IdentityMap;
return-object v0
.end method
.method public getReferenceResolver()Lcom/esotericsoftware/kryo/ReferenceResolver;
.locals 1
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->referenceResolver:Lcom/esotericsoftware/kryo/ReferenceResolver;
return-object v0
.end method
.method public getReferences()Z
.locals 1
iget-boolean v0, p0, Lcom/esotericsoftware/kryo/Kryo;->references:Z
return v0
.end method
.method public getRegistration(I)Lcom/esotericsoftware/kryo/Registration;
.locals 1
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->classResolver:Lcom/esotericsoftware/kryo/ClassResolver;
invoke-interface {v0, p1}, Lcom/esotericsoftware/kryo/ClassResolver;->getRegistration(I)Lcom/esotericsoftware/kryo/Registration;
move-result-object p1
return-object p1
.end method
.method public getRegistration(Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Registration;
.locals 2
if-eqz p1, :cond_7
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->classResolver:Lcom/esotericsoftware/kryo/ClassResolver;
invoke-interface {v0, p1}, Lcom/esotericsoftware/kryo/ClassResolver;->getRegistration(Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Registration;
move-result-object v0
if-nez v0, :cond_6
invoke-static {p1}, Ljava/lang/reflect/Proxy;->isProxyClass(Ljava/lang/Class;)Z
move-result v1
if-eqz v1, :cond_0
const-class v0, Ljava/lang/reflect/InvocationHandler;
invoke-virtual {p0, v0}, Lcom/esotericsoftware/kryo/Kryo;->getRegistration(Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Registration;
move-result-object v0
goto :goto_0
:cond_0
invoke-virtual {p1}, Ljava/lang/Class;->isEnum()Z
move-result v1
if-nez v1, :cond_1
const-class v1, Ljava/lang/Enum;
invoke-virtual {v1, p1}, Ljava/lang/Class;->isAssignableFrom(Ljava/lang/Class;)Z
move-result v1
if-eqz v1, :cond_1
invoke-virtual {p1}, Ljava/lang/Class;->getEnclosingClass()Ljava/lang/Class;
move-result-object v0
invoke-virtual {p0, v0}, Lcom/esotericsoftware/kryo/Kryo;->getRegistration(Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Registration;
move-result-object v0
goto :goto_0
:cond_1
const-class v1, Ljava/util/EnumSet;
invoke-virtual {v1, p1}, Ljava/lang/Class;->isAssignableFrom(Ljava/lang/Class;)Z
move-result v1
if-eqz v1, :cond_2
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->classResolver:Lcom/esotericsoftware/kryo/ClassResolver;
const-class v1, Ljava/util/EnumSet;
invoke-interface {v0, v1}, Lcom/esotericsoftware/kryo/ClassResolver;->getRegistration(Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Registration;
move-result-object v0
goto :goto_0
:cond_2
invoke-virtual {p0, p1}, Lcom/esotericsoftware/kryo/Kryo;->isClosure(Ljava/lang/Class;)Z
move-result v1
if-eqz v1, :cond_3
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->classResolver:Lcom/esotericsoftware/kryo/ClassResolver;
const-class v1, Lcom/esotericsoftware/kryo/serializers/ClosureSerializer$Closure;
invoke-interface {v0, v1}, Lcom/esotericsoftware/kryo/ClassResolver;->getRegistration(Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Registration;
move-result-object v0
:cond_3
:goto_0
if-nez v0, :cond_6
iget-boolean v0, p0, Lcom/esotericsoftware/kryo/Kryo;->registrationRequired:Z
if-nez v0, :cond_5
iget-boolean v0, p0, Lcom/esotericsoftware/kryo/Kryo;->warnUnregisteredClasses:Z
if-eqz v0, :cond_4
invoke-virtual {p0, p1}, Lcom/esotericsoftware/kryo/Kryo;->unregisteredClassMessage(Ljava/lang/Class;)Ljava/lang/String;
move-result-object v0
2019-10-09 23:16:36 +00:00
invoke-static {v0}, Lcom/esotericsoftware/a/a;->aj(Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
:cond_4
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->classResolver:Lcom/esotericsoftware/kryo/ClassResolver;
invoke-interface {v0, p1}, Lcom/esotericsoftware/kryo/ClassResolver;->registerImplicit(Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Registration;
move-result-object v0
goto :goto_1
:cond_5
new-instance v0, Ljava/lang/IllegalArgumentException;
invoke-virtual {p0, p1}, Lcom/esotericsoftware/kryo/Kryo;->unregisteredClassMessage(Ljava/lang/Class;)Ljava/lang/String;
move-result-object p1
invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
:cond_6
:goto_1
return-object v0
:cond_7
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string v0, "type cannot be null."
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public getSerializer(Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Serializer;
.locals 0
invoke-virtual {p0, p1}, Lcom/esotericsoftware/kryo/Kryo;->getRegistration(Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Registration;
move-result-object p1
invoke-virtual {p1}, Lcom/esotericsoftware/kryo/Registration;->getSerializer()Lcom/esotericsoftware/kryo/Serializer;
move-result-object p1
return-object p1
.end method
.method public getStreamFactory()Lcom/esotericsoftware/kryo/StreamFactory;
.locals 1
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->streamFactory:Lcom/esotericsoftware/kryo/StreamFactory;
return-object v0
.end method
.method public getTaggedFieldSerializerConfig()Lcom/esotericsoftware/kryo/serializers/TaggedFieldSerializerConfig;
.locals 1
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->taggedFieldSerializerConfig:Lcom/esotericsoftware/kryo/serializers/TaggedFieldSerializerConfig;
return-object v0
.end method
.method protected isClosure(Ljava/lang/Class;)Z
.locals 1
if-eqz p1, :cond_1
invoke-virtual {p1}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object p1
const/16 v0, 0x2f
invoke-virtual {p1, v0}, Ljava/lang/String;->indexOf(I)I
move-result p1
if-ltz p1, :cond_0
const/4 p1, 0x1
return p1
:cond_0
const/4 p1, 0x0
return p1
:cond_1
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string v0, "type cannot be null."
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public isFinal(Ljava/lang/Class;)Z
.locals 1
if-eqz p1, :cond_1
invoke-virtual {p1}, Ljava/lang/Class;->isArray()Z
move-result v0
if-eqz v0, :cond_0
invoke-static {p1}, Lcom/esotericsoftware/kryo/util/Util;->getElementClass(Ljava/lang/Class;)Ljava/lang/Class;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/Class;->getModifiers()I
move-result p1
invoke-static {p1}, Ljava/lang/reflect/Modifier;->isFinal(I)Z
move-result p1
return p1
:cond_0
invoke-virtual {p1}, Ljava/lang/Class;->getModifiers()I
move-result p1
invoke-static {p1}, Ljava/lang/reflect/Modifier;->isFinal(I)Z
move-result p1
return p1
:cond_1
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string v0, "type cannot be null."
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public isRegistrationRequired()Z
.locals 1
iget-boolean v0, p0, Lcom/esotericsoftware/kryo/Kryo;->registrationRequired:Z
return v0
.end method
.method public isWarnUnregisteredClasses()Z
.locals 1
iget-boolean v0, p0, Lcom/esotericsoftware/kryo/Kryo;->warnUnregisteredClasses:Z
return v0
.end method
.method protected newDefaultSerializer(Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Serializer;
.locals 1
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->defaultSerializer:Lcom/esotericsoftware/kryo/factories/SerializerFactory;
invoke-interface {v0, p0, p1}, Lcom/esotericsoftware/kryo/factories/SerializerFactory;->makeSerializer(Lcom/esotericsoftware/kryo/Kryo;Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Serializer;
move-result-object p1
return-object p1
.end method
.method public newInstance(Ljava/lang/Class;)Ljava/lang/Object;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Ljava/lang/Class<",
"TT;>;)TT;"
}
.end annotation
invoke-virtual {p0, p1}, Lcom/esotericsoftware/kryo/Kryo;->getRegistration(Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Registration;
move-result-object v0
invoke-virtual {v0}, Lcom/esotericsoftware/kryo/Registration;->getInstantiator()Lorg/b/a/a;
move-result-object v1
if-nez v1, :cond_0
invoke-virtual {p0, p1}, Lcom/esotericsoftware/kryo/Kryo;->newInstantiator(Ljava/lang/Class;)Lorg/b/a/a;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/esotericsoftware/kryo/Registration;->setInstantiator(Lorg/b/a/a;)V
:cond_0
invoke-interface {v1}, Lorg/b/a/a;->newInstance()Ljava/lang/Object;
move-result-object p1
return-object p1
.end method
.method protected newInstantiator(Ljava/lang/Class;)Lorg/b/a/a;
.locals 1
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->strategy:Lorg/b/b/b;
invoke-interface {v0, p1}, Lorg/b/b/b;->newInstantiatorOf(Ljava/lang/Class;)Lorg/b/a/a;
move-result-object p1
return-object p1
.end method
.method public readClass(Lcom/esotericsoftware/kryo/io/Input;)Lcom/esotericsoftware/kryo/Registration;
.locals 1
if-eqz p1, :cond_2
:try_start_0
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->classResolver:Lcom/esotericsoftware/kryo/ClassResolver;
invoke-interface {v0, p1}, Lcom/esotericsoftware/kryo/ClassResolver;->readClass(Lcom/esotericsoftware/kryo/io/Input;)Lcom/esotericsoftware/kryo/Registration;
move-result-object p1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
iget v0, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez v0, :cond_0
iget-boolean v0, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz v0, :cond_0
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_0
return-object p1
:catchall_0
move-exception p1
iget v0, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez v0, :cond_1
iget-boolean v0, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz v0, :cond_1
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_1
throw p1
:cond_2
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string v0, "input cannot be null."
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public readClassAndObject(Lcom/esotericsoftware/kryo/io/Input;)Ljava/lang/Object;
.locals 5
if-eqz p1, :cond_a
invoke-direct {p0}, Lcom/esotericsoftware/kryo/Kryo;->beginObject()V
const/4 v0, 0x1
:try_start_0
invoke-virtual {p0, p1}, Lcom/esotericsoftware/kryo/Kryo;->readClass(Lcom/esotericsoftware/kryo/io/Input;)Lcom/esotericsoftware/kryo/Registration;
move-result-object v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
const/4 v2, 0x0
if-nez v1, :cond_1
iget p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p1, v0
iput p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p1, :cond_0
iget-boolean p1, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p1, :cond_0
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_0
return-object v2
:cond_1
:try_start_1
invoke-virtual {v1}, Lcom/esotericsoftware/kryo/Registration;->getType()Ljava/lang/Class;
move-result-object v3
iget-boolean v4, p0, Lcom/esotericsoftware/kryo/Kryo;->references:Z
if-eqz v4, :cond_4
invoke-virtual {v1}, Lcom/esotericsoftware/kryo/Registration;->getSerializer()Lcom/esotericsoftware/kryo/Serializer;
move-result-object v4
invoke-virtual {v4, p0, v2}, Lcom/esotericsoftware/kryo/Serializer;->setGenerics(Lcom/esotericsoftware/kryo/Kryo;[Ljava/lang/Class;)V
const/4 v2, 0x0
invoke-virtual {p0, p1, v3, v2}, Lcom/esotericsoftware/kryo/Kryo;->readReferenceOrNull(Lcom/esotericsoftware/kryo/io/Input;Ljava/lang/Class;Z)I
move-result v2
const/4 v4, -0x1
if-ne v2, v4, :cond_3
iget-object p1, p0, Lcom/esotericsoftware/kryo/Kryo;->readObject:Ljava/lang/Object;
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
iget v1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr v1, v0
iput v1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez v1, :cond_2
iget-boolean v0, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz v0, :cond_2
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_2
return-object p1
:cond_3
:try_start_2
invoke-virtual {v1}, Lcom/esotericsoftware/kryo/Registration;->getSerializer()Lcom/esotericsoftware/kryo/Serializer;
move-result-object v1
invoke-virtual {v1, p0, p1, v3}, Lcom/esotericsoftware/kryo/Serializer;->read(Lcom/esotericsoftware/kryo/Kryo;Lcom/esotericsoftware/kryo/io/Input;Ljava/lang/Class;)Ljava/lang/Object;
move-result-object p1
iget-object v1, p0, Lcom/esotericsoftware/kryo/Kryo;->readReferenceIds:Lcom/esotericsoftware/kryo/util/IntArray;
iget v1, v1, Lcom/esotericsoftware/kryo/util/IntArray;->size:I
if-ne v2, v1, :cond_5
invoke-virtual {p0, p1}, Lcom/esotericsoftware/kryo/Kryo;->reference(Ljava/lang/Object;)V
goto :goto_0
:cond_4
invoke-virtual {v1}, Lcom/esotericsoftware/kryo/Registration;->getSerializer()Lcom/esotericsoftware/kryo/Serializer;
move-result-object v1
invoke-virtual {v1, p0, p1, v3}, Lcom/esotericsoftware/kryo/Serializer;->read(Lcom/esotericsoftware/kryo/Kryo;Lcom/esotericsoftware/kryo/io/Input;Ljava/lang/Class;)Ljava/lang/Object;
move-result-object p1
:cond_5
:goto_0
2019-10-09 23:16:36 +00:00
sget-boolean v1, Lcom/esotericsoftware/a/a;->FL:Z
2019-07-24 11:27:29 +00:00
if-nez v1, :cond_6
sget-boolean v1, Lcom/esotericsoftware/a/a;->DEBUG:Z
if-eqz v1, :cond_7
iget v1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-ne v1, v0, :cond_7
:cond_6
const-string v1, "Read"
invoke-static {v1, p1}, Lcom/esotericsoftware/kryo/util/Util;->log(Ljava/lang/String;Ljava/lang/Object;)V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
:cond_7
iget v1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr v1, v0
iput v1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez v1, :cond_8
iget-boolean v0, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz v0, :cond_8
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_8
return-object p1
:catchall_0
move-exception p1
iget v1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr v1, v0
iput v1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez v1, :cond_9
iget-boolean v0, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz v0, :cond_9
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_9
throw p1
:cond_a
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string v0, "input cannot be null."
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public readObject(Lcom/esotericsoftware/kryo/io/Input;Ljava/lang/Class;)Ljava/lang/Object;
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Lcom/esotericsoftware/kryo/io/Input;",
"Ljava/lang/Class<",
"TT;>;)TT;"
}
.end annotation
if-eqz p1, :cond_9
if-eqz p2, :cond_8
invoke-direct {p0}, Lcom/esotericsoftware/kryo/Kryo;->beginObject()V
const/4 v0, 0x1
:try_start_0
iget-boolean v1, p0, Lcom/esotericsoftware/kryo/Kryo;->references:Z
if-eqz v1, :cond_2
const/4 v1, 0x0
invoke-virtual {p0, p1, p2, v1}, Lcom/esotericsoftware/kryo/Kryo;->readReferenceOrNull(Lcom/esotericsoftware/kryo/io/Input;Ljava/lang/Class;Z)I
move-result v1
const/4 v2, -0x1
if-ne v1, v2, :cond_1
iget-object p1, p0, Lcom/esotericsoftware/kryo/Kryo;->readObject:Ljava/lang/Object;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
iget p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p2, v0
iput p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p2, :cond_0
iget-boolean p2, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p2, :cond_0
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_0
return-object p1
:cond_1
:try_start_1
invoke-virtual {p0, p2}, Lcom/esotericsoftware/kryo/Kryo;->getRegistration(Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Registration;
move-result-object v2
invoke-virtual {v2}, Lcom/esotericsoftware/kryo/Registration;->getSerializer()Lcom/esotericsoftware/kryo/Serializer;
move-result-object v2
invoke-virtual {v2, p0, p1, p2}, Lcom/esotericsoftware/kryo/Serializer;->read(Lcom/esotericsoftware/kryo/Kryo;Lcom/esotericsoftware/kryo/io/Input;Ljava/lang/Class;)Ljava/lang/Object;
move-result-object p1
iget-object p2, p0, Lcom/esotericsoftware/kryo/Kryo;->readReferenceIds:Lcom/esotericsoftware/kryo/util/IntArray;
iget p2, p2, Lcom/esotericsoftware/kryo/util/IntArray;->size:I
if-ne v1, p2, :cond_3
invoke-virtual {p0, p1}, Lcom/esotericsoftware/kryo/Kryo;->reference(Ljava/lang/Object;)V
goto :goto_0
:cond_2
invoke-virtual {p0, p2}, Lcom/esotericsoftware/kryo/Kryo;->getRegistration(Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Registration;
move-result-object v1
invoke-virtual {v1}, Lcom/esotericsoftware/kryo/Registration;->getSerializer()Lcom/esotericsoftware/kryo/Serializer;
move-result-object v1
invoke-virtual {v1, p0, p1, p2}, Lcom/esotericsoftware/kryo/Serializer;->read(Lcom/esotericsoftware/kryo/Kryo;Lcom/esotericsoftware/kryo/io/Input;Ljava/lang/Class;)Ljava/lang/Object;
move-result-object p1
:cond_3
:goto_0
2019-10-09 23:16:36 +00:00
sget-boolean p2, Lcom/esotericsoftware/a/a;->FL:Z
2019-07-24 11:27:29 +00:00
if-nez p2, :cond_4
sget-boolean p2, Lcom/esotericsoftware/a/a;->DEBUG:Z
if-eqz p2, :cond_5
iget p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-ne p2, v0, :cond_5
:cond_4
const-string p2, "Read"
invoke-static {p2, p1}, Lcom/esotericsoftware/kryo/util/Util;->log(Ljava/lang/String;Ljava/lang/Object;)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:cond_5
iget p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p2, v0
iput p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p2, :cond_6
iget-boolean p2, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p2, :cond_6
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_6
return-object p1
:catchall_0
move-exception p1
iget p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p2, v0
iput p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p2, :cond_7
iget-boolean p2, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p2, :cond_7
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_7
throw p1
:cond_8
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
:cond_9
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "input cannot be null."
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public readObject(Lcom/esotericsoftware/kryo/io/Input;Ljava/lang/Class;Lcom/esotericsoftware/kryo/Serializer;)Ljava/lang/Object;
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Lcom/esotericsoftware/kryo/io/Input;",
"Ljava/lang/Class<",
"TT;>;",
"Lcom/esotericsoftware/kryo/Serializer;",
")TT;"
}
.end annotation
if-eqz p1, :cond_a
if-eqz p2, :cond_9
if-eqz p3, :cond_8
invoke-direct {p0}, Lcom/esotericsoftware/kryo/Kryo;->beginObject()V
const/4 v0, 0x1
:try_start_0
iget-boolean v1, p0, Lcom/esotericsoftware/kryo/Kryo;->references:Z
if-eqz v1, :cond_2
const/4 v1, 0x0
invoke-virtual {p0, p1, p2, v1}, Lcom/esotericsoftware/kryo/Kryo;->readReferenceOrNull(Lcom/esotericsoftware/kryo/io/Input;Ljava/lang/Class;Z)I
move-result v1
const/4 v2, -0x1
if-ne v1, v2, :cond_1
iget-object p1, p0, Lcom/esotericsoftware/kryo/Kryo;->readObject:Ljava/lang/Object;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
iget p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p2, v0
iput p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p2, :cond_0
iget-boolean p2, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p2, :cond_0
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_0
return-object p1
:cond_1
:try_start_1
invoke-virtual {p3, p0, p1, p2}, Lcom/esotericsoftware/kryo/Serializer;->read(Lcom/esotericsoftware/kryo/Kryo;Lcom/esotericsoftware/kryo/io/Input;Ljava/lang/Class;)Ljava/lang/Object;
move-result-object p1
iget-object p2, p0, Lcom/esotericsoftware/kryo/Kryo;->readReferenceIds:Lcom/esotericsoftware/kryo/util/IntArray;
iget p2, p2, Lcom/esotericsoftware/kryo/util/IntArray;->size:I
if-ne v1, p2, :cond_3
invoke-virtual {p0, p1}, Lcom/esotericsoftware/kryo/Kryo;->reference(Ljava/lang/Object;)V
goto :goto_0
:cond_2
invoke-virtual {p3, p0, p1, p2}, Lcom/esotericsoftware/kryo/Serializer;->read(Lcom/esotericsoftware/kryo/Kryo;Lcom/esotericsoftware/kryo/io/Input;Ljava/lang/Class;)Ljava/lang/Object;
move-result-object p1
:cond_3
:goto_0
2019-10-09 23:16:36 +00:00
sget-boolean p2, Lcom/esotericsoftware/a/a;->FL:Z
2019-07-24 11:27:29 +00:00
if-nez p2, :cond_4
sget-boolean p2, Lcom/esotericsoftware/a/a;->DEBUG:Z
if-eqz p2, :cond_5
iget p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-ne p2, v0, :cond_5
:cond_4
const-string p2, "Read"
invoke-static {p2, p1}, Lcom/esotericsoftware/kryo/util/Util;->log(Ljava/lang/String;Ljava/lang/Object;)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:cond_5
iget p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p2, v0
iput p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p2, :cond_6
iget-boolean p2, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p2, :cond_6
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_6
return-object p1
:catchall_0
move-exception p1
iget p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p2, v0
iput p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p2, :cond_7
iget-boolean p2, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p2, :cond_7
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_7
throw p1
:cond_8
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_9
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
:cond_a
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "input cannot be null."
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public readObjectOrNull(Lcom/esotericsoftware/kryo/io/Input;Ljava/lang/Class;)Ljava/lang/Object;
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Lcom/esotericsoftware/kryo/io/Input;",
"Ljava/lang/Class<",
"TT;>;)TT;"
}
.end annotation
if-eqz p1, :cond_d
if-eqz p2, :cond_c
invoke-direct {p0}, Lcom/esotericsoftware/kryo/Kryo;->beginObject()V
const/4 v0, 0x1
:try_start_0
iget-boolean v1, p0, Lcom/esotericsoftware/kryo/Kryo;->references:Z
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
const-string v2, "Read"
if-eqz v1, :cond_2
:try_start_1
invoke-virtual {p0, p1, p2, v0}, Lcom/esotericsoftware/kryo/Kryo;->readReferenceOrNull(Lcom/esotericsoftware/kryo/io/Input;Ljava/lang/Class;Z)I
move-result v1
const/4 v3, -0x1
if-ne v1, v3, :cond_1
iget-object p1, p0, Lcom/esotericsoftware/kryo/Kryo;->readObject:Ljava/lang/Object;
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
iget p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p2, v0
iput p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p2, :cond_0
iget-boolean p2, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p2, :cond_0
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_0
return-object p1
:cond_1
:try_start_2
invoke-virtual {p0, p2}, Lcom/esotericsoftware/kryo/Kryo;->getRegistration(Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Registration;
move-result-object v3
invoke-virtual {v3}, Lcom/esotericsoftware/kryo/Registration;->getSerializer()Lcom/esotericsoftware/kryo/Serializer;
move-result-object v3
invoke-virtual {v3, p0, p1, p2}, Lcom/esotericsoftware/kryo/Serializer;->read(Lcom/esotericsoftware/kryo/Kryo;Lcom/esotericsoftware/kryo/io/Input;Ljava/lang/Class;)Ljava/lang/Object;
move-result-object p1
iget-object p2, p0, Lcom/esotericsoftware/kryo/Kryo;->readReferenceIds:Lcom/esotericsoftware/kryo/util/IntArray;
iget p2, p2, Lcom/esotericsoftware/kryo/util/IntArray;->size:I
if-ne v1, p2, :cond_7
invoke-virtual {p0, p1}, Lcom/esotericsoftware/kryo/Kryo;->reference(Ljava/lang/Object;)V
goto :goto_0
:cond_2
invoke-virtual {p0, p2}, Lcom/esotericsoftware/kryo/Kryo;->getRegistration(Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Registration;
move-result-object v1
invoke-virtual {v1}, Lcom/esotericsoftware/kryo/Registration;->getSerializer()Lcom/esotericsoftware/kryo/Serializer;
move-result-object v1
invoke-virtual {v1}, Lcom/esotericsoftware/kryo/Serializer;->getAcceptsNull()Z
move-result v3
if-nez v3, :cond_6
invoke-virtual {p1}, Lcom/esotericsoftware/kryo/io/Input;->readByte()B
move-result v3
if-nez v3, :cond_6
2019-10-09 23:16:36 +00:00
sget-boolean p1, Lcom/esotericsoftware/a/a;->FL:Z
2019-07-24 11:27:29 +00:00
const/4 p2, 0x0
if-nez p1, :cond_3
sget-boolean p1, Lcom/esotericsoftware/a/a;->DEBUG:Z
if-eqz p1, :cond_4
iget p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-ne p1, v0, :cond_4
:cond_3
invoke-static {v2, p2}, Lcom/esotericsoftware/kryo/util/Util;->log(Ljava/lang/String;Ljava/lang/Object;)V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
:cond_4
iget p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p1, v0
iput p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p1, :cond_5
iget-boolean p1, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p1, :cond_5
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_5
return-object p2
:cond_6
:try_start_3
invoke-virtual {v1, p0, p1, p2}, Lcom/esotericsoftware/kryo/Serializer;->read(Lcom/esotericsoftware/kryo/Kryo;Lcom/esotericsoftware/kryo/io/Input;Ljava/lang/Class;)Ljava/lang/Object;
move-result-object p1
:cond_7
:goto_0
2019-10-09 23:16:36 +00:00
sget-boolean p2, Lcom/esotericsoftware/a/a;->FL:Z
2019-07-24 11:27:29 +00:00
if-nez p2, :cond_8
sget-boolean p2, Lcom/esotericsoftware/a/a;->DEBUG:Z
if-eqz p2, :cond_9
iget p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-ne p2, v0, :cond_9
:cond_8
invoke-static {v2, p1}, Lcom/esotericsoftware/kryo/util/Util;->log(Ljava/lang/String;Ljava/lang/Object;)V
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
:cond_9
iget p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p2, v0
iput p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p2, :cond_a
iget-boolean p2, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p2, :cond_a
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_a
return-object p1
:catchall_0
move-exception p1
iget p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p2, v0
iput p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p2, :cond_b
iget-boolean p2, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p2, :cond_b
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_b
throw p1
:cond_c
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
:cond_d
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "input cannot be null."
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public readObjectOrNull(Lcom/esotericsoftware/kryo/io/Input;Ljava/lang/Class;Lcom/esotericsoftware/kryo/Serializer;)Ljava/lang/Object;
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Lcom/esotericsoftware/kryo/io/Input;",
"Ljava/lang/Class<",
"TT;>;",
"Lcom/esotericsoftware/kryo/Serializer;",
")TT;"
}
.end annotation
if-eqz p1, :cond_e
if-eqz p2, :cond_d
if-eqz p3, :cond_c
invoke-direct {p0}, Lcom/esotericsoftware/kryo/Kryo;->beginObject()V
const/4 v0, 0x1
:try_start_0
iget-boolean v1, p0, Lcom/esotericsoftware/kryo/Kryo;->references:Z
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
const-string v2, "Read"
if-eqz v1, :cond_2
:try_start_1
invoke-virtual {p0, p1, p2, v0}, Lcom/esotericsoftware/kryo/Kryo;->readReferenceOrNull(Lcom/esotericsoftware/kryo/io/Input;Ljava/lang/Class;Z)I
move-result v1
const/4 v3, -0x1
if-ne v1, v3, :cond_1
iget-object p1, p0, Lcom/esotericsoftware/kryo/Kryo;->readObject:Ljava/lang/Object;
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
iget p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p2, v0
iput p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p2, :cond_0
iget-boolean p2, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p2, :cond_0
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_0
return-object p1
:cond_1
:try_start_2
invoke-virtual {p3, p0, p1, p2}, Lcom/esotericsoftware/kryo/Serializer;->read(Lcom/esotericsoftware/kryo/Kryo;Lcom/esotericsoftware/kryo/io/Input;Ljava/lang/Class;)Ljava/lang/Object;
move-result-object p1
iget-object p2, p0, Lcom/esotericsoftware/kryo/Kryo;->readReferenceIds:Lcom/esotericsoftware/kryo/util/IntArray;
iget p2, p2, Lcom/esotericsoftware/kryo/util/IntArray;->size:I
if-ne v1, p2, :cond_7
invoke-virtual {p0, p1}, Lcom/esotericsoftware/kryo/Kryo;->reference(Ljava/lang/Object;)V
goto :goto_0
:cond_2
invoke-virtual {p3}, Lcom/esotericsoftware/kryo/Serializer;->getAcceptsNull()Z
move-result v1
if-nez v1, :cond_6
invoke-virtual {p1}, Lcom/esotericsoftware/kryo/io/Input;->readByte()B
move-result v1
if-nez v1, :cond_6
2019-10-09 23:16:36 +00:00
sget-boolean p1, Lcom/esotericsoftware/a/a;->FL:Z
2019-07-24 11:27:29 +00:00
const/4 p2, 0x0
if-nez p1, :cond_3
sget-boolean p1, Lcom/esotericsoftware/a/a;->DEBUG:Z
if-eqz p1, :cond_4
iget p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-ne p1, v0, :cond_4
:cond_3
invoke-static {v2, p2}, Lcom/esotericsoftware/kryo/util/Util;->log(Ljava/lang/String;Ljava/lang/Object;)V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
:cond_4
iget p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p1, v0
iput p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p1, :cond_5
iget-boolean p1, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p1, :cond_5
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_5
return-object p2
:cond_6
:try_start_3
invoke-virtual {p3, p0, p1, p2}, Lcom/esotericsoftware/kryo/Serializer;->read(Lcom/esotericsoftware/kryo/Kryo;Lcom/esotericsoftware/kryo/io/Input;Ljava/lang/Class;)Ljava/lang/Object;
move-result-object p1
:cond_7
:goto_0
2019-10-09 23:16:36 +00:00
sget-boolean p2, Lcom/esotericsoftware/a/a;->FL:Z
2019-07-24 11:27:29 +00:00
if-nez p2, :cond_8
sget-boolean p2, Lcom/esotericsoftware/a/a;->DEBUG:Z
if-eqz p2, :cond_9
iget p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-ne p2, v0, :cond_9
:cond_8
invoke-static {v2, p1}, Lcom/esotericsoftware/kryo/util/Util;->log(Ljava/lang/String;Ljava/lang/Object;)V
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
:cond_9
iget p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p2, v0
iput p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p2, :cond_a
iget-boolean p2, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p2, :cond_a
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_a
return-object p1
:catchall_0
move-exception p1
iget p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p2, v0
iput p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p2, :cond_b
iget-boolean p2, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p2, :cond_b
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_b
throw p1
:cond_c
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_d
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
:cond_e
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "input cannot be null."
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method readReferenceOrNull(Lcom/esotericsoftware/kryo/io/Input;Ljava/lang/Class;Z)I
.locals 4
invoke-virtual {p2}, Ljava/lang/Class;->isPrimitive()Z
move-result v0
if-eqz v0, :cond_0
invoke-static {p2}, Lcom/esotericsoftware/kryo/util/Util;->getWrapperClass(Ljava/lang/Class;)Ljava/lang/Class;
move-result-object p2
:cond_0
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->referenceResolver:Lcom/esotericsoftware/kryo/ReferenceResolver;
invoke-interface {v0, p2}, Lcom/esotericsoftware/kryo/ReferenceResolver;->useReferences(Ljava/lang/Class;)Z
move-result v0
const/4 v1, -0x1
const/4 v2, -0x2
const/4 v3, 0x1
if-eqz p3, :cond_4
invoke-virtual {p1, v3}, Lcom/esotericsoftware/kryo/io/Input;->readVarInt(Z)I
move-result p1
if-nez p1, :cond_3
2019-10-09 23:16:36 +00:00
sget-boolean p1, Lcom/esotericsoftware/a/a;->FL:Z
2019-07-24 11:27:29 +00:00
const/4 p2, 0x0
if-nez p1, :cond_1
sget-boolean p1, Lcom/esotericsoftware/a/a;->DEBUG:Z
if-eqz p1, :cond_2
iget p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-ne p1, v3, :cond_2
:cond_1
const-string p1, "Read"
invoke-static {p1, p2}, Lcom/esotericsoftware/kryo/util/Util;->log(Ljava/lang/String;Ljava/lang/Object;)V
:cond_2
iput-object p2, p0, Lcom/esotericsoftware/kryo/Kryo;->readObject:Ljava/lang/Object;
return v1
:cond_3
if-nez v0, :cond_6
iget-object p1, p0, Lcom/esotericsoftware/kryo/Kryo;->readReferenceIds:Lcom/esotericsoftware/kryo/util/IntArray;
invoke-virtual {p1, v2}, Lcom/esotericsoftware/kryo/util/IntArray;->add(I)V
iget-object p1, p0, Lcom/esotericsoftware/kryo/Kryo;->readReferenceIds:Lcom/esotericsoftware/kryo/util/IntArray;
iget p1, p1, Lcom/esotericsoftware/kryo/util/IntArray;->size:I
return p1
:cond_4
if-nez v0, :cond_5
iget-object p1, p0, Lcom/esotericsoftware/kryo/Kryo;->readReferenceIds:Lcom/esotericsoftware/kryo/util/IntArray;
invoke-virtual {p1, v2}, Lcom/esotericsoftware/kryo/util/IntArray;->add(I)V
iget-object p1, p0, Lcom/esotericsoftware/kryo/Kryo;->readReferenceIds:Lcom/esotericsoftware/kryo/util/IntArray;
iget p1, p1, Lcom/esotericsoftware/kryo/util/IntArray;->size:I
return p1
:cond_5
invoke-virtual {p1, v3}, Lcom/esotericsoftware/kryo/io/Input;->readVarInt(Z)I
move-result p1
:cond_6
const-string p3, ": "
const-string v0, "kryo"
if-ne p1, v3, :cond_8
iget-object p1, p0, Lcom/esotericsoftware/kryo/Kryo;->referenceResolver:Lcom/esotericsoftware/kryo/ReferenceResolver;
invoke-interface {p1, p2}, Lcom/esotericsoftware/kryo/ReferenceResolver;->nextReadId(Ljava/lang/Class;)I
move-result p1
2019-10-09 23:16:36 +00:00
sget-boolean v1, Lcom/esotericsoftware/a/a;->FL:Z
2019-07-24 11:27:29 +00:00
if-eqz v1, :cond_7
new-instance v1, Ljava/lang/StringBuilder;
const-string v2, "Read initial object reference "
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {v1, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-static {p2}, Lcom/esotericsoftware/kryo/util/Util;->className(Ljava/lang/Class;)Ljava/lang/String;
move-result-object p2
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p2
2019-10-09 23:16:36 +00:00
invoke-static {v0, p2}, Lcom/esotericsoftware/a/a;->u(Ljava/lang/String;Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
:cond_7
iget-object p2, p0, Lcom/esotericsoftware/kryo/Kryo;->readReferenceIds:Lcom/esotericsoftware/kryo/util/IntArray;
invoke-virtual {p2, p1}, Lcom/esotericsoftware/kryo/util/IntArray;->add(I)V
iget-object p1, p0, Lcom/esotericsoftware/kryo/Kryo;->readReferenceIds:Lcom/esotericsoftware/kryo/util/IntArray;
iget p1, p1, Lcom/esotericsoftware/kryo/util/IntArray;->size:I
return p1
:cond_8
add-int/2addr p1, v2
iget-object v2, p0, Lcom/esotericsoftware/kryo/Kryo;->referenceResolver:Lcom/esotericsoftware/kryo/ReferenceResolver;
invoke-interface {v2, p2, p1}, Lcom/esotericsoftware/kryo/ReferenceResolver;->getReadObject(Ljava/lang/Class;I)Ljava/lang/Object;
move-result-object p2
iput-object p2, p0, Lcom/esotericsoftware/kryo/Kryo;->readObject:Ljava/lang/Object;
sget-boolean p2, Lcom/esotericsoftware/a/a;->DEBUG:Z
if-eqz p2, :cond_9
new-instance p2, Ljava/lang/StringBuilder;
const-string v2, "Read object reference "
invoke-direct {p2, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object p1, p0, Lcom/esotericsoftware/kryo/Kryo;->readObject:Ljava/lang/Object;
invoke-static {p1}, Lcom/esotericsoftware/kryo/util/Util;->string(Ljava/lang/Object;)Ljava/lang/String;
move-result-object p1
invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
2019-10-09 23:16:36 +00:00
invoke-static {v0, p1}, Lcom/esotericsoftware/a/a;->t(Ljava/lang/String;Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
:cond_9
return v1
.end method
.method public reference(Ljava/lang/Object;)V
.locals 2
iget v0, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
if-lez v0, :cond_1
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->needsCopyReference:Ljava/lang/Object;
if-eqz v0, :cond_2
if-eqz p1, :cond_0
iget-object v1, p0, Lcom/esotericsoftware/kryo/Kryo;->originalToCopy:Lcom/esotericsoftware/kryo/util/IdentityMap;
invoke-virtual {v1, v0, p1}, Lcom/esotericsoftware/kryo/util/IdentityMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
const/4 p1, 0x0
iput-object p1, p0, Lcom/esotericsoftware/kryo/Kryo;->needsCopyReference:Ljava/lang/Object;
return-void
:cond_0
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string v0, "object cannot be null."
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
:cond_1
iget-boolean v0, p0, Lcom/esotericsoftware/kryo/Kryo;->references:Z
if-eqz v0, :cond_2
if-eqz p1, :cond_2
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->readReferenceIds:Lcom/esotericsoftware/kryo/util/IntArray;
invoke-virtual {v0}, Lcom/esotericsoftware/kryo/util/IntArray;->pop()I
move-result v0
const/4 v1, -0x2
if-eq v0, v1, :cond_2
iget-object v1, p0, Lcom/esotericsoftware/kryo/Kryo;->referenceResolver:Lcom/esotericsoftware/kryo/ReferenceResolver;
invoke-interface {v1, v0, p1}, Lcom/esotericsoftware/kryo/ReferenceResolver;->setReadObject(ILjava/lang/Object;)V
:cond_2
return-void
.end method
.method public register(Lcom/esotericsoftware/kryo/Registration;)Lcom/esotericsoftware/kryo/Registration;
.locals 3
invoke-virtual {p1}, Lcom/esotericsoftware/kryo/Registration;->getId()I
move-result v0
if-ltz v0, :cond_1
invoke-virtual {p1}, Lcom/esotericsoftware/kryo/Registration;->getId()I
move-result v0
invoke-virtual {p0, v0}, Lcom/esotericsoftware/kryo/Kryo;->getRegistration(I)Lcom/esotericsoftware/kryo/Registration;
move-result-object v0
sget-boolean v1, Lcom/esotericsoftware/a/a;->DEBUG:Z
if-eqz v1, :cond_0
if-eqz v0, :cond_0
invoke-virtual {v0}, Lcom/esotericsoftware/kryo/Registration;->getType()Ljava/lang/Class;
move-result-object v1
invoke-virtual {p1}, Lcom/esotericsoftware/kryo/Registration;->getType()Ljava/lang/Class;
move-result-object v2
if-eq v1, v2, :cond_0
new-instance v1, Ljava/lang/StringBuilder;
const-string v2, "An existing registration with a different type already uses ID: "
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p1}, Lcom/esotericsoftware/kryo/Registration;->getId()I
move-result v2
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string v2, "\nExisting registration: "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string v0, "\nis now overwritten with: "
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
2019-10-09 23:16:36 +00:00
invoke-static {v0}, Lcom/esotericsoftware/a/a;->v(Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
:cond_0
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->classResolver:Lcom/esotericsoftware/kryo/ClassResolver;
invoke-interface {v0, p1}, Lcom/esotericsoftware/kryo/ClassResolver;->register(Lcom/esotericsoftware/kryo/Registration;)Lcom/esotericsoftware/kryo/Registration;
move-result-object p1
return-object p1
:cond_1
new-instance p1, Ljava/lang/IllegalArgumentException;
invoke-static {v0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v0
const-string v1, "id must be > 0: "
invoke-virtual {v1, v0}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public register(Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Registration;
.locals 1
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->classResolver:Lcom/esotericsoftware/kryo/ClassResolver;
invoke-interface {v0, p1}, Lcom/esotericsoftware/kryo/ClassResolver;->getRegistration(Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Registration;
move-result-object v0
if-eqz v0, :cond_0
return-object v0
:cond_0
invoke-virtual {p0, p1}, Lcom/esotericsoftware/kryo/Kryo;->getDefaultSerializer(Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Serializer;
move-result-object v0
invoke-virtual {p0, p1, v0}, Lcom/esotericsoftware/kryo/Kryo;->register(Ljava/lang/Class;Lcom/esotericsoftware/kryo/Serializer;)Lcom/esotericsoftware/kryo/Registration;
move-result-object p1
return-object p1
.end method
.method public register(Ljava/lang/Class;I)Lcom/esotericsoftware/kryo/Registration;
.locals 1
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->classResolver:Lcom/esotericsoftware/kryo/ClassResolver;
invoke-interface {v0, p1}, Lcom/esotericsoftware/kryo/ClassResolver;->getRegistration(Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Registration;
move-result-object v0
if-eqz v0, :cond_0
return-object v0
:cond_0
invoke-virtual {p0, p1}, Lcom/esotericsoftware/kryo/Kryo;->getDefaultSerializer(Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Serializer;
move-result-object v0
invoke-virtual {p0, p1, v0, p2}, Lcom/esotericsoftware/kryo/Kryo;->register(Ljava/lang/Class;Lcom/esotericsoftware/kryo/Serializer;I)Lcom/esotericsoftware/kryo/Registration;
move-result-object p1
return-object p1
.end method
.method public register(Ljava/lang/Class;Lcom/esotericsoftware/kryo/Serializer;)Lcom/esotericsoftware/kryo/Registration;
.locals 3
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->classResolver:Lcom/esotericsoftware/kryo/ClassResolver;
invoke-interface {v0, p1}, Lcom/esotericsoftware/kryo/ClassResolver;->getRegistration(Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Registration;
move-result-object v0
if-eqz v0, :cond_0
invoke-virtual {v0, p2}, Lcom/esotericsoftware/kryo/Registration;->setSerializer(Lcom/esotericsoftware/kryo/Serializer;)V
return-object v0
:cond_0
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->classResolver:Lcom/esotericsoftware/kryo/ClassResolver;
new-instance v1, Lcom/esotericsoftware/kryo/Registration;
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->getNextRegistrationId()I
move-result v2
invoke-direct {v1, p1, p2, v2}, Lcom/esotericsoftware/kryo/Registration;-><init>(Ljava/lang/Class;Lcom/esotericsoftware/kryo/Serializer;I)V
invoke-interface {v0, v1}, Lcom/esotericsoftware/kryo/ClassResolver;->register(Lcom/esotericsoftware/kryo/Registration;)Lcom/esotericsoftware/kryo/Registration;
move-result-object p1
return-object p1
.end method
.method public register(Ljava/lang/Class;Lcom/esotericsoftware/kryo/Serializer;I)Lcom/esotericsoftware/kryo/Registration;
.locals 1
if-ltz p3, :cond_0
new-instance v0, Lcom/esotericsoftware/kryo/Registration;
invoke-direct {v0, p1, p2, p3}, Lcom/esotericsoftware/kryo/Registration;-><init>(Ljava/lang/Class;Lcom/esotericsoftware/kryo/Serializer;I)V
invoke-virtual {p0, v0}, Lcom/esotericsoftware/kryo/Kryo;->register(Lcom/esotericsoftware/kryo/Registration;)Lcom/esotericsoftware/kryo/Registration;
move-result-object p1
return-object p1
:cond_0
new-instance p1, Ljava/lang/IllegalArgumentException;
invoke-static {p3}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object p2
const-string p3, "id must be >= 0: "
invoke-virtual {p3, p2}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public reset()V
.locals 2
const/4 v0, 0x0
iput v0, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
iget-object v1, p0, Lcom/esotericsoftware/kryo/Kryo;->graphContext:Lcom/esotericsoftware/kryo/util/ObjectMap;
if-eqz v1, :cond_0
invoke-virtual {v1}, Lcom/esotericsoftware/kryo/util/ObjectMap;->clear()V
:cond_0
iget-object v1, p0, Lcom/esotericsoftware/kryo/Kryo;->classResolver:Lcom/esotericsoftware/kryo/ClassResolver;
invoke-interface {v1}, Lcom/esotericsoftware/kryo/ClassResolver;->reset()V
iget-boolean v1, p0, Lcom/esotericsoftware/kryo/Kryo;->references:Z
if-eqz v1, :cond_1
iget-object v1, p0, Lcom/esotericsoftware/kryo/Kryo;->referenceResolver:Lcom/esotericsoftware/kryo/ReferenceResolver;
invoke-interface {v1}, Lcom/esotericsoftware/kryo/ReferenceResolver;->reset()V
const/4 v1, 0x0
iput-object v1, p0, Lcom/esotericsoftware/kryo/Kryo;->readObject:Ljava/lang/Object;
:cond_1
iput v0, p0, Lcom/esotericsoftware/kryo/Kryo;->copyDepth:I
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->originalToCopy:Lcom/esotericsoftware/kryo/util/IdentityMap;
if-eqz v0, :cond_2
const/16 v1, 0x800
invoke-virtual {v0, v1}, Lcom/esotericsoftware/kryo/util/IdentityMap;->clear(I)V
:cond_2
2019-10-09 23:16:36 +00:00
sget-boolean v0, Lcom/esotericsoftware/a/a;->FL:Z
2019-07-24 11:27:29 +00:00
if-eqz v0, :cond_3
const-string v0, "kryo"
const-string v1, "Object graph complete."
2019-10-09 23:16:36 +00:00
invoke-static {v0, v1}, Lcom/esotericsoftware/a/a;->u(Ljava/lang/String;Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
:cond_3
return-void
.end method
.method public setAsmEnabled(Z)V
.locals 1
.annotation runtime Ljava/lang/Deprecated;
.end annotation
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->fieldSerializerConfig:Lcom/esotericsoftware/kryo/serializers/FieldSerializerConfig;
invoke-virtual {v0, p1}, Lcom/esotericsoftware/kryo/serializers/FieldSerializerConfig;->setUseAsm(Z)V
return-void
.end method
.method public setAutoReset(Z)V
.locals 0
iput-boolean p1, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
return-void
.end method
.method public setClassLoader(Ljava/lang/ClassLoader;)V
.locals 1
if-eqz p1, :cond_0
iput-object p1, p0, Lcom/esotericsoftware/kryo/Kryo;->classLoader:Ljava/lang/ClassLoader;
return-void
:cond_0
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string v0, "classLoader cannot be null."
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public setCopyReferences(Z)V
.locals 0
iput-boolean p1, p0, Lcom/esotericsoftware/kryo/Kryo;->copyReferences:Z
return-void
.end method
.method public setDefaultSerializer(Lcom/esotericsoftware/kryo/factories/SerializerFactory;)V
.locals 1
if-eqz p1, :cond_0
iput-object p1, p0, Lcom/esotericsoftware/kryo/Kryo;->defaultSerializer:Lcom/esotericsoftware/kryo/factories/SerializerFactory;
return-void
:cond_0
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 setDefaultSerializer(Ljava/lang/Class;)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Class<",
"+",
"Lcom/esotericsoftware/kryo/Serializer;",
">;)V"
}
.end annotation
if-eqz p1, :cond_0
new-instance v0, Lcom/esotericsoftware/kryo/factories/ReflectionSerializerFactory;
invoke-direct {v0, p1}, Lcom/esotericsoftware/kryo/factories/ReflectionSerializerFactory;-><init>(Ljava/lang/Class;)V
iput-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->defaultSerializer:Lcom/esotericsoftware/kryo/factories/SerializerFactory;
return-void
:cond_0
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 setInstantiatorStrategy(Lorg/b/b/b;)V
.locals 0
iput-object p1, p0, Lcom/esotericsoftware/kryo/Kryo;->strategy:Lorg/b/b/b;
return-void
.end method
.method public setMaxDepth(I)V
.locals 1
if-lez p1, :cond_0
iput p1, p0, Lcom/esotericsoftware/kryo/Kryo;->maxDepth:I
return-void
:cond_0
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string v0, "maxDepth must be > 0."
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public setReferenceResolver(Lcom/esotericsoftware/kryo/ReferenceResolver;)V
.locals 2
if-eqz p1, :cond_1
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/esotericsoftware/kryo/Kryo;->references:Z
iput-object p1, p0, Lcom/esotericsoftware/kryo/Kryo;->referenceResolver:Lcom/esotericsoftware/kryo/ReferenceResolver;
2019-10-09 23:16:36 +00:00
sget-boolean v0, Lcom/esotericsoftware/a/a;->FL:Z
2019-07-24 11:27:29 +00:00
if-eqz v0, :cond_0
new-instance v0, Ljava/lang/StringBuilder;
const-string v1, "Reference resolver: "
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
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;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
const-string v0, "kryo"
2019-10-09 23:16:36 +00:00
invoke-static {v0, p1}, Lcom/esotericsoftware/a/a;->u(Ljava/lang/String;Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
:cond_0
return-void
:cond_1
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string v0, "referenceResolver cannot be null."
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public setReferences(Z)Z
.locals 2
iget-boolean v0, p0, Lcom/esotericsoftware/kryo/Kryo;->references:Z
if-ne p1, v0, :cond_0
return p1
:cond_0
iput-boolean p1, p0, Lcom/esotericsoftware/kryo/Kryo;->references:Z
if-eqz p1, :cond_1
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->referenceResolver:Lcom/esotericsoftware/kryo/ReferenceResolver;
if-nez v0, :cond_1
new-instance v0, Lcom/esotericsoftware/kryo/util/MapReferenceResolver;
invoke-direct {v0}, Lcom/esotericsoftware/kryo/util/MapReferenceResolver;-><init>()V
iput-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->referenceResolver:Lcom/esotericsoftware/kryo/ReferenceResolver;
:cond_1
2019-10-09 23:16:36 +00:00
sget-boolean v0, Lcom/esotericsoftware/a/a;->FL:Z
2019-07-24 11:27:29 +00:00
if-eqz v0, :cond_2
invoke-static {p1}, Ljava/lang/String;->valueOf(Z)Ljava/lang/String;
move-result-object v0
const-string v1, "References: "
invoke-virtual {v1, v0}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
const-string v1, "kryo"
2019-10-09 23:16:36 +00:00
invoke-static {v1, v0}, Lcom/esotericsoftware/a/a;->u(Ljava/lang/String;Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
:cond_2
if-nez p1, :cond_3
const/4 p1, 0x1
return p1
:cond_3
const/4 p1, 0x0
return p1
.end method
.method public setRegistrationRequired(Z)V
.locals 1
iput-boolean p1, p0, Lcom/esotericsoftware/kryo/Kryo;->registrationRequired:Z
2019-10-09 23:16:36 +00:00
sget-boolean v0, Lcom/esotericsoftware/a/a;->FL:Z
2019-07-24 11:27:29 +00:00
if-eqz v0, :cond_0
invoke-static {p1}, Ljava/lang/String;->valueOf(Z)Ljava/lang/String;
move-result-object p1
const-string v0, "Registration required: "
invoke-virtual {v0, p1}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
const-string v0, "kryo"
2019-10-09 23:16:36 +00:00
invoke-static {v0, p1}, Lcom/esotericsoftware/a/a;->u(Ljava/lang/String;Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
:cond_0
return-void
.end method
.method public setStreamFactory(Lcom/esotericsoftware/kryo/StreamFactory;)V
.locals 0
iput-object p1, p0, Lcom/esotericsoftware/kryo/Kryo;->streamFactory:Lcom/esotericsoftware/kryo/StreamFactory;
return-void
.end method
.method public setWarnUnregisteredClasses(Z)V
.locals 1
iput-boolean p1, p0, Lcom/esotericsoftware/kryo/Kryo;->warnUnregisteredClasses:Z
2019-10-09 23:16:36 +00:00
sget-boolean v0, Lcom/esotericsoftware/a/a;->FL:Z
2019-07-24 11:27:29 +00:00
if-eqz v0, :cond_0
invoke-static {p1}, Ljava/lang/String;->valueOf(Z)Ljava/lang/String;
move-result-object p1
const-string v0, "Warn unregistered classes: "
invoke-virtual {v0, p1}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
const-string v0, "kryo"
2019-10-09 23:16:36 +00:00
invoke-static {v0, p1}, Lcom/esotericsoftware/a/a;->u(Ljava/lang/String;Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
:cond_0
return-void
.end method
.method protected unregisteredClassMessage(Ljava/lang/Class;)Ljava/lang/String;
.locals 2
new-instance v0, Ljava/lang/StringBuilder;
const-string v1, "Class is not registered: "
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-static {p1}, 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, "\nNote: To register this class use: kryo.register("
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-static {p1}, Lcom/esotericsoftware/kryo/util/Util;->className(Ljava/lang/Class;)Ljava/lang/String;
move-result-object p1
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p1, ".class);"
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
return-object p1
.end method
.method public writeClass(Lcom/esotericsoftware/kryo/io/Output;Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Registration;
.locals 1
if-eqz p1, :cond_2
:try_start_0
iget-object v0, p0, Lcom/esotericsoftware/kryo/Kryo;->classResolver:Lcom/esotericsoftware/kryo/ClassResolver;
invoke-interface {v0, p1, p2}, Lcom/esotericsoftware/kryo/ClassResolver;->writeClass(Lcom/esotericsoftware/kryo/io/Output;Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Registration;
move-result-object p1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
iget p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p2, :cond_0
iget-boolean p2, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p2, :cond_0
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_0
return-object p1
:catchall_0
move-exception p1
iget p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p2, :cond_1
iget-boolean p2, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p2, :cond_1
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_1
throw p1
:cond_2
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "output cannot be null."
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public writeClassAndObject(Lcom/esotericsoftware/kryo/io/Output;Ljava/lang/Object;)V
.locals 4
if-eqz p1, :cond_8
invoke-direct {p0}, Lcom/esotericsoftware/kryo/Kryo;->beginObject()V
const/4 v0, 0x0
const/4 v1, 0x1
if-nez p2, :cond_1
:try_start_0
invoke-virtual {p0, p1, v0}, Lcom/esotericsoftware/kryo/Kryo;->writeClass(Lcom/esotericsoftware/kryo/io/Output;Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Registration;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
iget p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p1, v1
iput p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p1, :cond_0
iget-boolean p1, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p1, :cond_0
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_0
return-void
:cond_1
:try_start_1
invoke-virtual {p2}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v2
invoke-virtual {p0, p1, v2}, Lcom/esotericsoftware/kryo/Kryo;->writeClass(Lcom/esotericsoftware/kryo/io/Output;Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Registration;
move-result-object v2
iget-boolean v3, p0, Lcom/esotericsoftware/kryo/Kryo;->references:Z
if-eqz v3, :cond_3
const/4 v3, 0x0
invoke-virtual {p0, p1, p2, v3}, Lcom/esotericsoftware/kryo/Kryo;->writeReferenceOrNull(Lcom/esotericsoftware/kryo/io/Output;Ljava/lang/Object;Z)Z
move-result v3
if-eqz v3, :cond_3
invoke-virtual {v2}, Lcom/esotericsoftware/kryo/Registration;->getSerializer()Lcom/esotericsoftware/kryo/Serializer;
move-result-object p1
invoke-virtual {p1, p0, v0}, Lcom/esotericsoftware/kryo/Serializer;->setGenerics(Lcom/esotericsoftware/kryo/Kryo;[Ljava/lang/Class;)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
iget p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p1, v1
iput p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p1, :cond_2
iget-boolean p1, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p1, :cond_2
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_2
return-void
:cond_3
:try_start_2
2019-10-09 23:16:36 +00:00
sget-boolean v0, Lcom/esotericsoftware/a/a;->FL:Z
2019-07-24 11:27:29 +00:00
if-nez v0, :cond_4
sget-boolean v0, Lcom/esotericsoftware/a/a;->DEBUG:Z
if-eqz v0, :cond_5
iget v0, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-ne v0, v1, :cond_5
:cond_4
const-string v0, "Write"
invoke-static {v0, p2}, Lcom/esotericsoftware/kryo/util/Util;->log(Ljava/lang/String;Ljava/lang/Object;)V
:cond_5
invoke-virtual {v2}, Lcom/esotericsoftware/kryo/Registration;->getSerializer()Lcom/esotericsoftware/kryo/Serializer;
move-result-object v0
invoke-virtual {v0, p0, p1, p2}, Lcom/esotericsoftware/kryo/Serializer;->write(Lcom/esotericsoftware/kryo/Kryo;Lcom/esotericsoftware/kryo/io/Output;Ljava/lang/Object;)V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
iget p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p1, v1
iput p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p1, :cond_6
iget-boolean p1, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p1, :cond_6
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_6
return-void
:catchall_0
move-exception p1
iget p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p2, v1
iput p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p2, :cond_7
iget-boolean p2, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p2, :cond_7
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_7
throw p1
:cond_8
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "output cannot be null."
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public writeObject(Lcom/esotericsoftware/kryo/io/Output;Ljava/lang/Object;)V
.locals 2
if-eqz p1, :cond_7
if-eqz p2, :cond_6
invoke-direct {p0}, Lcom/esotericsoftware/kryo/Kryo;->beginObject()V
const/4 v0, 0x1
:try_start_0
iget-boolean v1, p0, Lcom/esotericsoftware/kryo/Kryo;->references:Z
if-eqz v1, :cond_1
const/4 v1, 0x0
invoke-virtual {p0, p1, p2, v1}, Lcom/esotericsoftware/kryo/Kryo;->writeReferenceOrNull(Lcom/esotericsoftware/kryo/io/Output;Ljava/lang/Object;Z)Z
move-result v1
if-eqz v1, :cond_1
invoke-virtual {p2}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object p1
invoke-virtual {p0, p1}, Lcom/esotericsoftware/kryo/Kryo;->getRegistration(Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Registration;
move-result-object p1
invoke-virtual {p1}, Lcom/esotericsoftware/kryo/Registration;->getSerializer()Lcom/esotericsoftware/kryo/Serializer;
move-result-object p1
const/4 p2, 0x0
invoke-virtual {p1, p0, p2}, Lcom/esotericsoftware/kryo/Serializer;->setGenerics(Lcom/esotericsoftware/kryo/Kryo;[Ljava/lang/Class;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
iget p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p1, v0
iput p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p1, :cond_0
iget-boolean p1, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p1, :cond_0
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_0
return-void
:cond_1
:try_start_1
2019-10-09 23:16:36 +00:00
sget-boolean v1, Lcom/esotericsoftware/a/a;->FL:Z
2019-07-24 11:27:29 +00:00
if-nez v1, :cond_2
sget-boolean v1, Lcom/esotericsoftware/a/a;->DEBUG:Z
if-eqz v1, :cond_3
iget v1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-ne v1, v0, :cond_3
:cond_2
const-string v1, "Write"
invoke-static {v1, p2}, Lcom/esotericsoftware/kryo/util/Util;->log(Ljava/lang/String;Ljava/lang/Object;)V
:cond_3
invoke-virtual {p2}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v1
invoke-virtual {p0, v1}, Lcom/esotericsoftware/kryo/Kryo;->getRegistration(Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Registration;
move-result-object v1
invoke-virtual {v1}, Lcom/esotericsoftware/kryo/Registration;->getSerializer()Lcom/esotericsoftware/kryo/Serializer;
move-result-object v1
invoke-virtual {v1, p0, p1, p2}, Lcom/esotericsoftware/kryo/Serializer;->write(Lcom/esotericsoftware/kryo/Kryo;Lcom/esotericsoftware/kryo/io/Output;Ljava/lang/Object;)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
iget p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p1, v0
iput p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p1, :cond_4
iget-boolean p1, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p1, :cond_4
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_4
return-void
:catchall_0
move-exception p1
iget p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p2, v0
iput p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p2, :cond_5
iget-boolean p2, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p2, :cond_5
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_5
throw p1
:cond_6
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "object cannot be null."
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
:cond_7
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "output cannot be null."
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public writeObject(Lcom/esotericsoftware/kryo/io/Output;Ljava/lang/Object;Lcom/esotericsoftware/kryo/Serializer;)V
.locals 2
if-eqz p1, :cond_8
if-eqz p2, :cond_7
if-eqz p3, :cond_6
invoke-direct {p0}, Lcom/esotericsoftware/kryo/Kryo;->beginObject()V
const/4 v0, 0x1
:try_start_0
iget-boolean v1, p0, Lcom/esotericsoftware/kryo/Kryo;->references:Z
if-eqz v1, :cond_1
const/4 v1, 0x0
invoke-virtual {p0, p1, p2, v1}, Lcom/esotericsoftware/kryo/Kryo;->writeReferenceOrNull(Lcom/esotericsoftware/kryo/io/Output;Ljava/lang/Object;Z)Z
move-result v1
if-eqz v1, :cond_1
const/4 p1, 0x0
invoke-virtual {p3, p0, p1}, Lcom/esotericsoftware/kryo/Serializer;->setGenerics(Lcom/esotericsoftware/kryo/Kryo;[Ljava/lang/Class;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
iget p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p1, v0
iput p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p1, :cond_0
iget-boolean p1, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p1, :cond_0
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_0
return-void
:cond_1
:try_start_1
2019-10-09 23:16:36 +00:00
sget-boolean v1, Lcom/esotericsoftware/a/a;->FL:Z
2019-07-24 11:27:29 +00:00
if-nez v1, :cond_2
sget-boolean v1, Lcom/esotericsoftware/a/a;->DEBUG:Z
if-eqz v1, :cond_3
iget v1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-ne v1, v0, :cond_3
:cond_2
const-string v1, "Write"
invoke-static {v1, p2}, Lcom/esotericsoftware/kryo/util/Util;->log(Ljava/lang/String;Ljava/lang/Object;)V
:cond_3
invoke-virtual {p3, p0, p1, p2}, Lcom/esotericsoftware/kryo/Serializer;->write(Lcom/esotericsoftware/kryo/Kryo;Lcom/esotericsoftware/kryo/io/Output;Ljava/lang/Object;)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
iget p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p1, v0
iput p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p1, :cond_4
iget-boolean p1, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p1, :cond_4
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_4
return-void
:catchall_0
move-exception p1
iget p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p2, v0
iput p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p2, :cond_5
iget-boolean p2, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p2, :cond_5
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_5
throw p1
:cond_6
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_7
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "object cannot be null."
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
:cond_8
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "output cannot be null."
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public writeObjectOrNull(Lcom/esotericsoftware/kryo/io/Output;Ljava/lang/Object;Lcom/esotericsoftware/kryo/Serializer;)V
.locals 4
if-eqz p1, :cond_c
if-eqz p3, :cond_b
invoke-direct {p0}, Lcom/esotericsoftware/kryo/Kryo;->beginObject()V
const/4 v0, 0x1
:try_start_0
iget-boolean v1, p0, Lcom/esotericsoftware/kryo/Kryo;->references:Z
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
const-string v2, "Write"
const/4 v3, 0x0
if-eqz v1, :cond_1
:try_start_1
invoke-virtual {p0, p1, p2, v0}, Lcom/esotericsoftware/kryo/Kryo;->writeReferenceOrNull(Lcom/esotericsoftware/kryo/io/Output;Ljava/lang/Object;Z)Z
move-result v1
if-eqz v1, :cond_6
invoke-virtual {p3, p0, v3}, Lcom/esotericsoftware/kryo/Serializer;->setGenerics(Lcom/esotericsoftware/kryo/Kryo;[Ljava/lang/Class;)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
iget p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p1, v0
iput p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p1, :cond_0
iget-boolean p1, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p1, :cond_0
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_0
return-void
:cond_1
:try_start_2
invoke-virtual {p3}, Lcom/esotericsoftware/kryo/Serializer;->getAcceptsNull()Z
move-result v1
if-nez v1, :cond_6
if-nez p2, :cond_5
2019-10-09 23:16:36 +00:00
sget-boolean p2, Lcom/esotericsoftware/a/a;->FL:Z
2019-07-24 11:27:29 +00:00
if-nez p2, :cond_2
sget-boolean p2, Lcom/esotericsoftware/a/a;->DEBUG:Z
if-eqz p2, :cond_3
iget p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-ne p2, v0, :cond_3
:cond_2
invoke-static {v2, v3}, Lcom/esotericsoftware/kryo/util/Util;->log(Ljava/lang/String;Ljava/lang/Object;)V
:cond_3
const/4 p2, 0x0
invoke-virtual {p1, p2}, Lcom/esotericsoftware/kryo/io/Output;->writeByte(B)V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
iget p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p1, v0
iput p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p1, :cond_4
iget-boolean p1, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p1, :cond_4
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_4
return-void
:cond_5
:try_start_3
invoke-virtual {p1, v0}, Lcom/esotericsoftware/kryo/io/Output;->writeByte(B)V
:cond_6
2019-10-09 23:16:36 +00:00
sget-boolean v1, Lcom/esotericsoftware/a/a;->FL:Z
2019-07-24 11:27:29 +00:00
if-nez v1, :cond_7
sget-boolean v1, Lcom/esotericsoftware/a/a;->DEBUG:Z
if-eqz v1, :cond_8
iget v1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-ne v1, v0, :cond_8
:cond_7
invoke-static {v2, p2}, Lcom/esotericsoftware/kryo/util/Util;->log(Ljava/lang/String;Ljava/lang/Object;)V
:cond_8
invoke-virtual {p3, p0, p1, p2}, Lcom/esotericsoftware/kryo/Serializer;->write(Lcom/esotericsoftware/kryo/Kryo;Lcom/esotericsoftware/kryo/io/Output;Ljava/lang/Object;)V
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
iget p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p1, v0
iput p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p1, :cond_9
iget-boolean p1, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p1, :cond_9
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_9
return-void
:catchall_0
move-exception p1
iget p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p2, v0
iput p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p2, :cond_a
iget-boolean p2, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p2, :cond_a
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_a
throw p1
:cond_b
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_c
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "output cannot be null."
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public writeObjectOrNull(Lcom/esotericsoftware/kryo/io/Output;Ljava/lang/Object;Ljava/lang/Class;)V
.locals 3
if-eqz p1, :cond_b
invoke-direct {p0}, Lcom/esotericsoftware/kryo/Kryo;->beginObject()V
const/4 v0, 0x1
:try_start_0
invoke-virtual {p0, p3}, Lcom/esotericsoftware/kryo/Kryo;->getRegistration(Ljava/lang/Class;)Lcom/esotericsoftware/kryo/Registration;
move-result-object p3
invoke-virtual {p3}, Lcom/esotericsoftware/kryo/Registration;->getSerializer()Lcom/esotericsoftware/kryo/Serializer;
move-result-object p3
iget-boolean v1, p0, Lcom/esotericsoftware/kryo/Kryo;->references:Z
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
const-string v2, "Write"
if-eqz v1, :cond_1
:try_start_1
invoke-virtual {p0, p1, p2, v0}, Lcom/esotericsoftware/kryo/Kryo;->writeReferenceOrNull(Lcom/esotericsoftware/kryo/io/Output;Ljava/lang/Object;Z)Z
move-result v1
if-eqz v1, :cond_6
const/4 p1, 0x0
invoke-virtual {p3, p0, p1}, Lcom/esotericsoftware/kryo/Serializer;->setGenerics(Lcom/esotericsoftware/kryo/Kryo;[Ljava/lang/Class;)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
iget p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p1, v0
iput p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p1, :cond_0
iget-boolean p1, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p1, :cond_0
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_0
return-void
:cond_1
:try_start_2
invoke-virtual {p3}, Lcom/esotericsoftware/kryo/Serializer;->getAcceptsNull()Z
move-result v1
if-nez v1, :cond_6
if-nez p2, :cond_5
2019-10-09 23:16:36 +00:00
sget-boolean p3, Lcom/esotericsoftware/a/a;->FL:Z
2019-07-24 11:27:29 +00:00
if-nez p3, :cond_2
sget-boolean p3, Lcom/esotericsoftware/a/a;->DEBUG:Z
if-eqz p3, :cond_3
iget p3, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-ne p3, v0, :cond_3
:cond_2
invoke-static {v2, p2}, Lcom/esotericsoftware/kryo/util/Util;->log(Ljava/lang/String;Ljava/lang/Object;)V
:cond_3
const/4 p2, 0x0
invoke-virtual {p1, p2}, Lcom/esotericsoftware/kryo/io/Output;->writeByte(B)V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
iget p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p1, v0
iput p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p1, :cond_4
iget-boolean p1, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p1, :cond_4
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_4
return-void
:cond_5
:try_start_3
invoke-virtual {p1, v0}, Lcom/esotericsoftware/kryo/io/Output;->writeByte(B)V
:cond_6
2019-10-09 23:16:36 +00:00
sget-boolean v1, Lcom/esotericsoftware/a/a;->FL:Z
2019-07-24 11:27:29 +00:00
if-nez v1, :cond_7
sget-boolean v1, Lcom/esotericsoftware/a/a;->DEBUG:Z
if-eqz v1, :cond_8
iget v1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-ne v1, v0, :cond_8
:cond_7
invoke-static {v2, p2}, Lcom/esotericsoftware/kryo/util/Util;->log(Ljava/lang/String;Ljava/lang/Object;)V
:cond_8
invoke-virtual {p3, p0, p1, p2}, Lcom/esotericsoftware/kryo/Serializer;->write(Lcom/esotericsoftware/kryo/Kryo;Lcom/esotericsoftware/kryo/io/Output;Ljava/lang/Object;)V
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
iget p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p1, v0
iput p1, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p1, :cond_9
iget-boolean p1, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p1, :cond_9
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_9
return-void
:catchall_0
move-exception p1
iget p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
sub-int/2addr p2, v0
iput p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-nez p2, :cond_a
iget-boolean p2, p0, Lcom/esotericsoftware/kryo/Kryo;->autoReset:Z
if-eqz p2, :cond_a
invoke-virtual {p0}, Lcom/esotericsoftware/kryo/Kryo;->reset()V
:cond_a
throw p1
:cond_b
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "output cannot be null."
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method writeReferenceOrNull(Lcom/esotericsoftware/kryo/io/Output;Ljava/lang/Object;Z)Z
.locals 5
const/4 v0, 0x0
const/4 v1, 0x1
if-nez p2, :cond_2
2019-10-09 23:16:36 +00:00
sget-boolean p2, Lcom/esotericsoftware/a/a;->FL:Z
2019-07-24 11:27:29 +00:00
if-nez p2, :cond_0
sget-boolean p2, Lcom/esotericsoftware/a/a;->DEBUG:Z
if-eqz p2, :cond_1
iget p2, p0, Lcom/esotericsoftware/kryo/Kryo;->depth:I
if-ne p2, v1, :cond_1
:cond_0
const/4 p2, 0x0
const-string p3, "Write"
invoke-static {p3, p2}, Lcom/esotericsoftware/kryo/util/Util;->log(Ljava/lang/String;Ljava/lang/Object;)V
:cond_1
invoke-virtual {p1, v0, v1}, Lcom/esotericsoftware/kryo/io/Output;->writeVarInt(IZ)I
return v1
:cond_2
iget-object v2, p0, Lcom/esotericsoftware/kryo/Kryo;->referenceResolver:Lcom/esotericsoftware/kryo/ReferenceResolver;
invoke-virtual {p2}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v3
invoke-interface {v2, v3}, Lcom/esotericsoftware/kryo/ReferenceResolver;->useReferences(Ljava/lang/Class;)Z
move-result v2
if-nez v2, :cond_4
if-eqz p3, :cond_3
invoke-virtual {p1, v1, v1}, Lcom/esotericsoftware/kryo/io/Output;->writeVarInt(IZ)I
:cond_3
return v0
:cond_4
iget-object p3, p0, Lcom/esotericsoftware/kryo/Kryo;->referenceResolver:Lcom/esotericsoftware/kryo/ReferenceResolver;
invoke-interface {p3, p2}, Lcom/esotericsoftware/kryo/ReferenceResolver;->getWrittenId(Ljava/lang/Object;)I
move-result p3
const/4 v2, -0x1
const-string v3, ": "
const-string v4, "kryo"
if-eq p3, v2, :cond_6
sget-boolean v0, Lcom/esotericsoftware/a/a;->DEBUG:Z
if-eqz v0, :cond_5
new-instance v0, Ljava/lang/StringBuilder;
const-string v2, "Write object reference "
invoke-direct {v0, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v0, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-static {p2}, Lcom/esotericsoftware/kryo/util/Util;->string(Ljava/lang/Object;)Ljava/lang/String;
move-result-object p2
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p2
2019-10-09 23:16:36 +00:00
invoke-static {v4, p2}, Lcom/esotericsoftware/a/a;->t(Ljava/lang/String;Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
:cond_5
add-int/lit8 p3, p3, 0x2
invoke-virtual {p1, p3, v1}, Lcom/esotericsoftware/kryo/io/Output;->writeVarInt(IZ)I
return v1
:cond_6
iget-object p3, p0, Lcom/esotericsoftware/kryo/Kryo;->referenceResolver:Lcom/esotericsoftware/kryo/ReferenceResolver;
invoke-interface {p3, p2}, Lcom/esotericsoftware/kryo/ReferenceResolver;->addWrittenObject(Ljava/lang/Object;)I
move-result p3
invoke-virtual {p1, v1, v1}, Lcom/esotericsoftware/kryo/io/Output;->writeVarInt(IZ)I
2019-10-09 23:16:36 +00:00
sget-boolean p1, Lcom/esotericsoftware/a/a;->FL:Z
2019-07-24 11:27:29 +00:00
if-eqz p1, :cond_7
new-instance p1, Ljava/lang/StringBuilder;
const-string v1, "Write initial object reference "
invoke-direct {p1, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p1, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {p1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-static {p2}, Lcom/esotericsoftware/kryo/util/Util;->string(Ljava/lang/Object;)Ljava/lang/String;
move-result-object p2
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
2019-10-09 23:16:36 +00:00
invoke-static {v4, p1}, Lcom/esotericsoftware/a/a;->u(Ljava/lang/String;Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
:cond_7
return v0
.end method