discord-jadx/app/src/main/java/com/esotericsoftware/kryo/Registration.java

68 lines
1.7 KiB
Java
Raw Normal View History

2021-06-27 20:44:35 +00:00
package com.esotericsoftware.kryo;
import c.e.a.a;
import com.esotericsoftware.kryo.util.Util;
import h0.b.a.a;
public class Registration {
/* renamed from: id reason: collision with root package name */
2021-07-13 20:23:20 +00:00
private final int f2174id;
2021-06-27 20:44:35 +00:00
private a instantiator;
private Serializer serializer;
private final Class type;
public Registration(Class cls, Serializer serializer, int i) {
if (cls == null) {
throw new IllegalArgumentException("type cannot be null.");
} else if (serializer != null) {
this.type = cls;
this.serializer = serializer;
2021-07-13 20:23:20 +00:00
this.f2174id = i;
2021-06-27 20:44:35 +00:00
} else {
throw new IllegalArgumentException("serializer cannot be null.");
}
}
public int getId() {
2021-07-13 20:23:20 +00:00
return this.f2174id;
2021-06-27 20:44:35 +00:00
}
public a getInstantiator() {
return this.instantiator;
}
public Serializer getSerializer() {
return this.serializer;
}
public Class getType() {
return this.type;
}
public void setInstantiator(a aVar) {
if (aVar != null) {
this.instantiator = aVar;
return;
}
throw new IllegalArgumentException("instantiator cannot be null.");
}
public void setSerializer(Serializer serializer) {
if (serializer != null) {
this.serializer = serializer;
2021-07-13 20:23:20 +00:00
a.C0053a aVar = c.e.a.a.a;
2021-06-27 20:44:35 +00:00
return;
}
throw new IllegalArgumentException("serializer cannot be null.");
}
public String toString() {
StringBuilder L = c.d.b.a.a.L("[");
2021-07-13 20:23:20 +00:00
L.append(this.f2174id);
2021-06-27 20:44:35 +00:00
L.append(", ");
L.append(Util.className(this.type));
L.append("]");
return L.toString();
}
}