com.threerings.export
Class Stringifier<T>

java.lang.Object
  extended by com.threerings.export.Stringifier<T>

public abstract class Stringifier<T>
extends Object

Converts objects to and from strings.


Constructor Summary
Stringifier()
           
 
Method Summary
abstract  T fromString(String string)
          Converts a string to an object.
static Stringifier getStringifier(Class<?> clazz)
          Returns the stringifier, if any, for the specified class.
abstract  String toString(T value)
          Converts an object to a string.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Stringifier

public Stringifier()
Method Detail

getStringifier

public static Stringifier getStringifier(Class<?> clazz)
Returns the stringifier, if any, for the specified class.


toString

public abstract String toString(T value)
Converts an object to a string.


fromString

public abstract T fromString(String string)
                      throws Exception
Converts a string to an object. Some failures to convert will simply return null rather than throwing an exception.

Throws:
Exception


Copyright © 2011. All Rights Reserved.