@Override public Object newInstance () { try { return constructor.newInstance(); } catch (Exception ex) { throw new KryoException("Error constructing instance of class: " + className(type), ex); } } };
@Override public Object newInstance () { try { return constructor.newInstance(); } catch (Exception ex) { throw new KryoException("Error constructing instance of class: " + className(type), ex); } } };
@Override public Object newInstance () { try { return access.newInstance(); } catch (Exception ex) { throw new KryoException("Error constructing instance of class: " + className(type), ex); } } };
@Override public Object newInstance () { try { return access.newInstance(); } catch (Exception ex) { throw new KryoException("Error constructing instance of class: " + className(type), ex); } } };
public String toString () { return "[" + id + ", " + className(type) + "]"; } }
public String toString () { return "[" + id + ", " + className(type) + "]"; } }
public String toString () { return "[" + id + ", " + className(type) + "]"; } }
protected void checkIncorrectClass(Class type) { if (type != null && !Serializable.class.isAssignableFrom(type)) { throw new IllegalArgumentException(String.format("Class is not registered: %s\nNote: To register this class use: kryo.register(\"%s\".class);", Util.className(type), Util.className(type))); } }
protected void checkIncorrectObject(T object) { if (object != null && !(object instanceof Serializable)) { String className = Util.className(object.getClass()); throw new IllegalArgumentException(String.format("Class is not registered: %s\nNote: To register this class use: kryo.register(\"%s\".class);", className, className)); } } }
/** Returns the object formatted as a string. The format depends on the object's type and whether {@link Object#toString()} has * been overridden. */ static public String string (Object object) { if (object == null) return "null"; Class type = object.getClass(); if (type.isArray()) return className(type); try { if (type.getMethod("toString", new Class[0]).getDeclaringClass() == Object.class) return TRACE ? className(type) : type.getSimpleName(); } catch (Exception ignored) { } return String.valueOf(object); }
public Object newInstance () { try { return constructor.newInstance(); } catch (Exception ex) { throw new KryoException("Error constructing instance of class: " + className(type), ex); } } };
public Object newInstance () { try { return constructor.newInstance(); } catch (Exception ex) { throw new KryoException("Error constructing instance of class: " + className(type), ex); } } };
@Override public void apply(Kryo k) { try { k.register(klass, serializerKlass.newInstance()); } catch (Exception ex) { throw new IllegalArgumentException("Unable to create serializer \"" + serializerKlass.getName() + "\" for class: " + Util.className(klass), ex); } } @Override
public Object newInstance () { try { return constructor.newInstance(); } catch (Exception ex) { throw new KryoException("Error constructing instance of class: " + className(type), ex); } } };
public Object newInstance () { try { return access.newInstance(); } catch (Exception ex) { throw new KryoException("Error constructing instance of class: " + className(type), ex); } } };
public Object newInstance () { try { return access.newInstance(); } catch (Exception ex) { throw new KryoException("Error constructing instance of class: " + className(type), ex); } } };
public Object newInstance () { try { return access.newInstance(); } catch (Exception ex) { throw new KryoException("Error constructing instance of class: " + className(type), ex); } } };