Class VersionConverter

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

    public final class VersionConverter
    extends Object
    implements com.thoughtworks.xstream.converters.SingleValueConverter

    An XStream converter for Version instances.

    Since:
    2018.1
    Author:
    Andrey Shcheglov <mailto:andrey.shcheglov@jetbrains.com>
    • Constructor Detail

      • VersionConverter

        public VersionConverter()
    • Method Detail

      • canConvert

        public boolean canConvert​(@NotNull
                                  Class type)
        Specified by:
        canConvert in interface com.thoughtworks.xstream.converters.ConverterMatcher
        See Also:
        ConverterMatcher.canConvert(Class)
      • toString

        @NotNull
        public String toString​(@NotNull
                               Object obj)
        Specified by:
        toString in interface com.thoughtworks.xstream.converters.SingleValueConverter
        See Also:
        SingleValueConverter.toString(Object)
      • fromString

        @NotNull
        public Version fromString​(@NotNull
                                  String str)
        Specified by:
        fromString in interface com.thoughtworks.xstream.converters.SingleValueConverter
        See Also:
        SingleValueConverter.fromString(String)