@Test public void testRegisterSerializer() throws Exception { try { serializationManager.register(new NothingReallySerializer()); serializationManager.serialize(new NothingReally(), new BinarySerializationOutput(new NullOutputStream())); } finally { serializationManager.unregister(new NothingReallySerializer()); } assertTrue(true); }
private <T> void registerSerializer(ObjectSerializer<T> serializer) { Type type = getSerializerObjectType(serializer); if (defaultSerializers.containsKey(type)) { logger.warn("Registering serializer " + serializer.getClass().getName() + " which overrides previously registered serializer for class " + type); } defaultSerializers.put(type, serializer); }
SerializationManager { private <T> void registerSerializer(ObjectSerializer<T> serializer) { Type type = getSerializerObjectType(serializer); if (defaultSerializers.containsKey(type)) { logger.warn("Registering serializer " + serializer.getClass().getName() + " which overrides previously registered serializer for class " + type); } defaultSerializers.put(type, serializer); } }
SerializationManager { private <T> void registerSerializer(ObjectSerializer<T> serializer) { Type type = getSerializerObjectType(serializer); if (defaultSerializers.containsKey(type)) { logger.warn("Registering serializer " + serializer.getClass().getName() + " which overrides previously registered serializer for class " + type); } defaultSerializers.put(type, serializer); } protected  SerializationManager(); protected  SerializationManager(Iterable<ObjectSerializer<?>> serializers); }
SerializationManager { private <T> void registerSerializer(ObjectSerializer<T> serializer) { Type type = getSerializerObjectType(serializer); if (defaultSerializers.containsKey(type)) { logger.warn("Registering serializer " + serializer.getClass().getName() + " which overrides previously registered serializer for class " + type); } defaultSerializers.put(type, serializer); } protected  SerializationManager(); protected  SerializationManager(Iterable<ObjectSerializer<?>> serializers); void register(ObjectSerializer<T> serializer); void registerAdditional(ObjectSerializer<T> serializer); void registerOverride(ObjectSerializer<T> serializer); void unregister(ObjectSerializer<T> serializer); void serialize(T object, SerializationOutput output); void serializeStream(Iterable<T> object, SerializationOutput output); void serializeWrapExceptions(T object, File file); void serialize(T object, File file); @SuppressWarnings("unchecked") T deserialize(SerializationInput input); Sequence<T> deserializeStream(final SerializationInput input); T deserializeWrapExceptions(File file); T deserialize(File file); T deserialize(InputStream stream); SerializationInput getAppropriateSerializationInput(File file); static SerializationManager createDefault(); }
SerializationManager { private <T> void registerSerializer(ObjectSerializer<T> serializer) { Type type = getSerializerObjectType(serializer); if (defaultSerializers.containsKey(type)) { logger.warn("Registering serializer " + serializer.getClass().getName() + " which overrides previously registered serializer for class " + type); } defaultSerializers.put(type, serializer); } protected  SerializationManager(); protected  SerializationManager(Iterable<ObjectSerializer<?>> serializers); void register(ObjectSerializer<T> serializer); void registerAdditional(ObjectSerializer<T> serializer); void registerOverride(ObjectSerializer<T> serializer); void unregister(ObjectSerializer<T> serializer); void serialize(T object, SerializationOutput output); void serializeStream(Iterable<T> object, SerializationOutput output); void serializeWrapExceptions(T object, File file); void serialize(T object, File file); @SuppressWarnings("unchecked") T deserialize(SerializationInput input); Sequence<T> deserializeStream(final SerializationInput input); T deserializeWrapExceptions(File file); T deserialize(File file); T deserialize(InputStream stream); SerializationInput getAppropriateSerializationInput(File file); static SerializationManager createDefault();  }