com.googlecode.sarasvati.env
Interface AttributeConverter

All Known Implementing Classes:
AbstractStringValueOfAttributeConverter, BooleanAttributeConverter, ByteAttributeConverter, CharacterAttributeConverter, DateAttributeConverter, DoubleAttributeConverter, FloatAttributeConverter, IntegerAttributeConverter, LongAttributeConverter, ShortAttributeConverter, StringAttributeConverter

public interface AttributeConverter

Interface for converting to and from objects and strings. Used for loading custom data from XML process definitions into nodes as well as transforming process/token/token set Env attributes to and from database friendly strings.

AttributeConverters should be registered with and used from the AttributeConverters class.

Author:
Paul Lorenz

Method Summary
 String objectToString(Object object)
          Converts the given object into string format.
 Object stringToObject(String string, Class<?> type)
          Converts the given string into an object of the given type.
 

Method Detail

objectToString

String objectToString(Object object)
Converts the given object into string format.

Parameters:
object - The object to converter
Returns:
The object in string format

stringToObject

Object stringToObject(String string,
                      Class<?> type)
Converts the given string into an object of the given type.

Parameters:
string - The string to be converted into an object
type - The type to transform the string into
Returns:
The object produced from the string