|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.dse.base.types.AbstractConverter
This class resides at the top of the Converter hierarchy and provides an abstract implementation of the Conversion interface for Type specific Converters to extend.
Field Summary | |
protected java.util.Hashtable |
keyValuePairs
The parameterization for this Converter, understood by concrete subclasses |
Fields inherited from interface com.ibm.dse.base.types.TypeConstants |
CONV_TYPE_DEFAULT,
CONV_TYPE_HOST,
CONV_TYPE_OUTPUT,
CONV_TYPE_SER,
CONV_TYPE_XML,
disabled,
hidden,
isDisabled,
isHidden,
isMandatory,
isOmitted,
isReadOnly,
mandatory,
omitted,
readOnly,
TYPE_DEFAULT,
TYPE_REGISTRY_INIT_SIZE |
Constructor Summary | |
AbstractConverter(java.lang.String[] supportedConversionTypes,
java.util.Hashtable keyValuePairs)
This constructor creates an instance of a Converter which supports the conversion types passed. |
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 writer passed 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. |
abstract void |
formatToWriterForType(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 writer passed as argument. |
abstract void |
formatToWriterForType(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 writer passed as argument.Parameters required by the specific type converter may be taken from the owner descriptor by using the descriptor passed as argument. |
java.util.Hashtable |
getParameters()
Returns the keyValuePairs hashtable. |
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. |
abstract java.lang.Object |
unformatFromReaderForType(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. |
abstract java.lang.Object |
unformatFromReaderForType(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 locale. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected final java.util.Hashtable keyValuePairs
Constructor Detail |
public AbstractConverter(java.lang.String[] supportedConversionTypes, java.util.Hashtable keyValuePairs) throws DSETypeException
supportedConversionTypes
- String[] The supported conversion types.keyValuePairs
- Hashtable The parameterisation for this Converter.Method Detail |
public void formatToWriter(java.lang.Object value, java.lang.String conversionType, java.io.Writer writer, PropertyDescription descriptor) throws DSETypeException
value
- Object ObjectconversionType
- Stringwriter
- Writerpublic void formatToWriter(java.lang.Object value, java.lang.String conversionType, java.io.Writer writer, PropertyDescription descriptor, java.util.Locale locale) throws DSETypeException
value
- ObjectconversionType
- Stringwriter
- Writerdescriptor
- PropertyDescriptionlocale
- Localepublic abstract void formatToWriterForType(java.lang.Object value, java.lang.String conversionType, java.io.Writer writer, PropertyDescription descriptor) throws java.lang.Exception
value
- ObjectconversionType
- Stringwriter
- Writerdescriptor
- PropertyDescriptorpublic abstract void formatToWriterForType(java.lang.Object value, java.lang.String conversionType, java.io.Writer writer, PropertyDescription descriptor, java.util.Locale locale) throws java.lang.Exception
value
- ObjectconversionType
- Stringwriter
- Writerdescriptor
- PropertyDescriptionlocale
- Localepublic java.util.Hashtable getParameters()
public java.lang.String[] getSupportedConversionTypes()
public boolean supportsConversionType(java.lang.String conversionType)
conversionType
- Stringpublic java.lang.Object unformatFromReader(java.io.Reader reader, java.lang.String conversionType, PropertyDescription descriptor) throws DSETypeException
reader
- ReaderconversionType
- Stringdescriptor
- PropertyDescriptionpublic java.lang.Object unformatFromReader(java.io.Reader reader, java.lang.String conversionType, PropertyDescription descriptor, java.util.Locale locale) throws DSETypeException
reader
- ReaderconversionType
- Stringdescriptor
- PropertyDescriptionlocale
- Localepublic abstract java.lang.Object unformatFromReaderForType(java.io.Reader reader, java.lang.String conversionType, PropertyDescription descriptor) throws java.lang.Exception
reader
- ReaderconversionType
- Stringdescriptor
- PropertyDescriptionpublic abstract java.lang.Object unformatFromReaderForType(java.io.Reader reader, java.lang.String conversionType, PropertyDescription descriptor, java.util.Locale locale) throws java.lang.Exception
reader
- ReaderconversionType
- Stringdescriptor
- PropertyDescriptionlocale
- Locale
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |