@Test void testClassForType() { Class actual = testSubject.classForType(new SimpleSerializedType(MySerializableObject.class.getName(), "2166108932776672373")); assertEquals(MySerializableObject.class, actual); }
@Override public Class classForType(SerializedType type) { if (SerializedType.emptyType().equals(type)) { return Void.class; } try { return Class.forName(type.getName()); } catch (ClassNotFoundException e) { return UnknownSerializedType.class; } }
JavaSerializer implements Serializer { @Override public Class classForType(SerializedType type) { if (SerializedType.emptyType().equals(type)) { return Void.class; } try { return Class.forName(type.getName()); } catch (ClassNotFoundException e) { return UnknownSerializedType.class; } } }
JavaSerializer implements Serializer { @Override public Class classForType(SerializedType type) { if (SerializedType.emptyType().equals(type)) { return Void.class; } try { return Class.forName(type.getName()); } catch (ClassNotFoundException e) { return UnknownSerializedType.class; } } protected  JavaSerializer(Builder builder); }
JavaSerializer implements Serializer { @Override public Class classForType(SerializedType type) { if (SerializedType.emptyType().equals(type)) { return Void.class; } try { return Class.forName(type.getName()); } catch (ClassNotFoundException e) { return UnknownSerializedType.class; } } protected  JavaSerializer(Builder builder); static Builder builder(); @SuppressWarnings({"NonSerializableObjectPassedToObjectStream", "ThrowFromFinallyBlock"}) @Override SerializedObject<T> serialize(Object instance, Class<T> expectedType); @Override boolean canSerializeTo(Class<T> expectedRepresentation); @SuppressWarnings("unchecked") @Override T deserialize(SerializedObject<S> serializedObject); @Override Class classForType(SerializedType type); @Override SerializedType typeForClass(Class type); @Override Converter getConverter(); }
JavaSerializer implements Serializer { @Override public Class classForType(SerializedType type) { if (SerializedType.emptyType().equals(type)) { return Void.class; } try { return Class.forName(type.getName()); } catch (ClassNotFoundException e) { return UnknownSerializedType.class; } } protected  JavaSerializer(Builder builder); static Builder builder(); @SuppressWarnings({"NonSerializableObjectPassedToObjectStream", "ThrowFromFinallyBlock"}) @Override SerializedObject<T> serialize(Object instance, Class<T> expectedType); @Override boolean canSerializeTo(Class<T> expectedRepresentation); @SuppressWarnings("unchecked") @Override T deserialize(SerializedObject<S> serializedObject); @Override Class classForType(SerializedType type); @Override SerializedType typeForClass(Class type); @Override Converter getConverter();  }