Class VersionedExternalizable.Converter

  • All Implemented Interfaces:
    com.thoughtworks.xstream.converters.Converter, com.thoughtworks.xstream.converters.ConverterMatcher, com.thoughtworks.xstream.core.Caching
    Enclosing class:
    VersionedExternalizable

    public static class VersionedExternalizable.Converter
    extends com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter
    This XStream converter stores the externalizable version of the class as a Document-level attribute for easy access by translators. Right now, though, since we don't have any version translators, we don't try to reconstitute XML corresponding to anything but the current version.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter

        com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.DuplicateFieldException, com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.UnknownFieldException
    • Field Summary

      • Fields inherited from class com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter

        mapper, reflectionProvider, serializationMembers, serializationMethodInvoker
    • Constructor Summary

      Constructors 
      Constructor Description
      Converter​(com.thoughtworks.xstream.mapper.Mapper mapper, com.thoughtworks.xstream.converters.reflection.ReflectionProvider reflectionProvider)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean canConvert​(Class type)  
      Object doUnmarshal​(Object result, com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)  
      void marshal​(Object source, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context)  
      • Methods inherited from class com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter

        canAccess, doMarshal, flushCache, instantiateNewInstance, marshallField, readResolve, shouldUnmarshalField, shouldUnmarshalTransientFields, unmarshal, unmarshallField
    • Constructor Detail

      • Converter

        public Converter​(com.thoughtworks.xstream.mapper.Mapper mapper,
                         com.thoughtworks.xstream.converters.reflection.ReflectionProvider reflectionProvider)
    • Method Detail

      • canConvert

        public boolean canConvert​(Class type)
      • marshal

        public void marshal​(Object source,
                            com.thoughtworks.xstream.io.HierarchicalStreamWriter writer,
                            com.thoughtworks.xstream.converters.MarshallingContext context)
        Specified by:
        marshal in interface com.thoughtworks.xstream.converters.Converter
        Overrides:
        marshal in class com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter
      • doUnmarshal

        public Object doUnmarshal​(Object result,
                                  com.thoughtworks.xstream.io.HierarchicalStreamReader reader,
                                  com.thoughtworks.xstream.converters.UnmarshallingContext context)
        Overrides:
        doUnmarshal in class com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter