com.ibm.dse.base.types
Interface Conversion

All Known Implementing Classes:
AbstractConverter

public interface Conversion


Method Summary
 void formatToWriter(java.lang.Object value, java.lang.String conversionType, java.io.Writer writer, PropertyDescription descriptor)
          The value passed as an Object is formatted using the specified conversion type and writter pssed as argument.
 void formatToWriter(java.lang.Object value, java.lang.String conversionType, java.io.Writer writer, PropertyDescription descriptor, java.util.Locale locale)
          The value passed as an Object is formatted using the specified conversion type, locale and writter passed as argument.
 java.lang.String[] getSupportedConversionTypes()
          Returns an array of conversion types supported by this Converter.
 boolean supportsConversionType(java.lang.String conversionType)
          Returns a flag indicating whether the conversion type passed as argument is supported.
 java.lang.Object unformatFromReader(java.io.Reader reader, java.lang.String conversionType, PropertyDescription descriptor)
          Uses the reader passed to construct an Object of the correct Type using the appropriate conversion type.
 java.lang.Object unformatFromReader(java.io.Reader reader, java.lang.String conversionType, PropertyDescription descriptor, java.util.Locale locale)
          Uses the reader passed to construct an Object of the correct Type using the appropriate conversion type, and the given locale.
 

Method Detail

formatToWriter

public void formatToWriter(java.lang.Object value,
                           java.lang.String conversionType,
                           java.io.Writer writer,
                           PropertyDescription descriptor)
                    throws DSETypeException
The value passed as an Object is formatted using the specified conversion type and writter pssed as argument. Parameters required by the specific type converter may be taken from the owner descriptor by using the descriptor passed as argument.
Parameters:
value - Object
conversionType - String
writer - Writer
descriptor - PropertyDescription

formatToWriter

public void formatToWriter(java.lang.Object value,
                           java.lang.String conversionType,
                           java.io.Writer writer,
                           PropertyDescription descriptor,
                           java.util.Locale locale)
                    throws DSETypeException
The value passed as an Object is formatted using the specified conversion type, locale and writter passed as argument. Parameters required by the specific type converter may be taken from the owner descriptor by using the descriptor passed as argument.
Parameters:
value - Object
conversionType - String
writer - Writer
descriptor - PropertyDescription
locale - Locale

getSupportedConversionTypes

public java.lang.String[] getSupportedConversionTypes()
Returns an array of conversion types supported by this Converter.
Returns:
String[]

supportsConversionType

public boolean supportsConversionType(java.lang.String conversionType)
Returns a flag indicating whether the conversion type passed as argument is supported.
Parameters:
conversionType - String
Returns:
boolean

unformatFromReader

public java.lang.Object unformatFromReader(java.io.Reader reader,
                                           java.lang.String conversionType,
                                           PropertyDescription descriptor)
                                    throws DSETypeException
Uses the reader passed to construct an Object of the correct Type using the appropriate conversion type. Parameters required by the specific type converter may be taken from the owner descriptor by using the descriptor passed as argument.
Parameters:
reader - Reader
conversionType - String
descriptor - PropertyDescription
Returns:
Object
Throws:
DSETypeException - Unformatting is unsuccessful.

unformatFromReader

public java.lang.Object unformatFromReader(java.io.Reader reader,
                                           java.lang.String conversionType,
                                           PropertyDescription descriptor,
                                           java.util.Locale locale)
                                    throws DSETypeException
Uses the reader passed to construct an Object of the correct Type using the appropriate conversion type, and the given locale. Parameters required by the specific type converter may be taken from the owner descriptor by using the descriptor passed as argument.
Parameters:
reader - Reader
conversionType - String
descriptor - PropertyDescription
locale - Locale
Returns:
Object
Throws:
DSETypeException - Unformatting is unsuccessful.