com.googlecode.sarasvati.env
Class StringAttributeConverter

java.lang.Object
  extended by com.googlecode.sarasvati.env.StringAttributeConverter
All Implemented Interfaces:
AttributeConverter

public final class StringAttributeConverter
extends Object
implements AttributeConverter

Identity converter for String <--> String

Author:
Paul Lorenz

Constructor Summary
StringAttributeConverter()
           
 
Method Summary
 String objectToString(Object object)
          Converts the given object into string format.
 Object stringToObject(String string, Class<?> object)
          Converts the given string into an object of the given type.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringAttributeConverter

public StringAttributeConverter()
Method Detail

objectToString

public String objectToString(Object object)
Description copied from interface: AttributeConverter
Converts the given object into string format.

Specified by:
objectToString in interface AttributeConverter
Parameters:
object - The object to converter
Returns:
The object in string format

stringToObject

public Object stringToObject(String string,
                             Class<?> object)
Description copied from interface: AttributeConverter
Converts the given string into an object of the given type.

Specified by:
stringToObject in interface AttributeConverter
Parameters:
string - The string to be converted into an object
object - The type to transform the string into
Returns:
The object produced from the string