Class BambooDateTimeConverter

  • All Implemented Interfaces:
    com.thoughtworks.xstream.converters.ConverterMatcher, com.thoughtworks.xstream.converters.SingleValueConverter

    public class BambooDateTimeConverter
    extends com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter
    This class lets us persist JODA DataTime objects without saving all the internal junk associated with the class.
    • Constructor Detail

      • BambooDateTimeConverter

        public BambooDateTimeConverter()
    • Method Detail

      • canConvert

        public boolean canConvert​(Class type)
        Inform XStream that we're responsible for converting the DateTime objects.
        Specified by:
        canConvert in interface com.thoughtworks.xstream.converters.ConverterMatcher
        Specified by:
        canConvert in class com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter
      • fromString

        public Object fromString​(String str)
        Specified by:
        fromString in interface com.thoughtworks.xstream.converters.SingleValueConverter
        Specified by:
        fromString in class com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter
      • toString

        public String toString​(Object object)
        Specified by:
        toString in interface com.thoughtworks.xstream.converters.SingleValueConverter
        Overrides:
        toString in class com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter