org.sape.carbon.core.config.type
Interface ConfigurationTypeHandler

All Known Implementing Classes:
BooleanTypeHandler, ByteTypeHandler, ClassTypeHandler, DateTypeHandler, DoubleTypeHandler, EnumTypeHandler, FloatTypeHandler, IntegerTypeHandler, LongTypeHandler, ShortTypeHandler, StringTypeHandler, URLTypeHandler

public interface ConfigurationTypeHandler

This interface provides for the basic functionality of reading and writing configuration elements from and two configuration storage mechanisms. This works with configuration types that use string-based formats as their underlying types.

Copyright 2002 Sapient

Since:
carbon 1.0
Version:
$Revision: 1.12 $($Author: dvoet $ / $Date: 2003/05/05 21:21:20 $)
Author:
Greg Hinkle, January 2002

Method Summary
 Object toObject(Class returnType, String stringValue)
          Translates the String representation of data in an object version
 String toString(Object objectValue)
          Translates the an Object into the string version of itself
 

Method Detail

toString

public String toString(Object objectValue)
Translates the an Object into the string version of itself

Parameters:
objectValue - The object to be translated
Returns:
the string version of the object

toObject

public Object toObject(Class returnType,
                       String stringValue)
                throws TypeConversionException
Translates the String representation of data in an object version

Parameters:
returnType - the type of the return value
stringValue - the string representation of the data
Returns:
the object value of the data represented by the supplied string
Throws:
TypeConversionException - when there is a formatting problem with the supplied string data


Copyright 1999-2003 Sapient Corporation. All Rights Reserved.