Class ToStringConverter

  • All Implemented Interfaces:
    ConverterMatcher, SingleValueConverter

    public class ToStringConverter
    extends AbstractSingleValueConverter
    Convenient converter for classes with natural string representation. Converter for classes that adopt the following convention: - a constructor that takes a single string parameter - a toString() that is overloaded to issue a string that is meaningful
    Author:
    Paul Hammant
    • Constructor Summary

      Constructors 
      Constructor Description
      ToStringConverter​(java.lang.Class clazz)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean canConvert​(java.lang.Class type)
      Determines whether the converter can marshall a particular type.
      java.lang.Object fromString​(java.lang.String str)
      Unmarshals an Object from its single value representation.
      java.lang.String toString​(java.lang.Object obj)
      Marshals an Object into a single value representation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ToStringConverter

        public ToStringConverter​(java.lang.Class clazz)
                          throws java.lang.NoSuchMethodException
        Throws:
        java.lang.NoSuchMethodException