/** * Searches the registered Serializers for one, that is responsible for the given class. * * @param clazz class of objects, that can be de/serialized with returned Serializer * @return a Serializer that can handle objects of given class */ private Serializable findResponsible(Class<?> clazz) { for (Serializable serializer : serializers) if (serializer.isResponsible(clazz)) return serializer; return null; }