Class DefaultTransformer

  • All Implemented Interfaces:
    Transformer

    public final class DefaultTransformer
    extends Object
    implements Transformer
    WARNING, slow as a senile dog, uses Java Serialization and base64 encoding to get a String representation of an Object. It is highly recommended that you provide your own implementation of Transformer.
    Author:
    Navin Surtani, anistor@redhat.com
    • Constructor Detail

      • DefaultTransformer

        public DefaultTransformer()
    • Method Detail

      • fromString

        public Object fromString​(String str)
        Description copied from interface: Transformer
        Transforms a String into an Object.
        Specified by:
        fromString in interface Transformer
        Parameters:
        str - cannot be null
        Returns:
        the Object that is encoded in the given String
      • toString

        public String toString​(Object obj)
        Description copied from interface: Transformer
        Transforms an Object into a String.
        Specified by:
        toString in interface Transformer
        Parameters:
        obj - cannot be null
        Returns:
        the String representation of the object