|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.fdsapi.ConverterBase
Base class for Converter objects used to convert an input Object to an output Object. This class
implements the decorator design pattern that allows the chaining of Converters together. Each one
checking the passed in data and taking action if appropriate. The last decorator in the chain
takes action first and passes the CHANGED output Object up the chain and further action may be
taken by other Converters at this point. Keep in mind that the Object being passed up the change
for action may not be the same type as the input Object was. For example a Date may go down the
chain and a Date converted to a String may come up the chain. The last Converter in the chain
is always the NullConverter which simply returns the input Object.
View Code
| Constructor Summary | |
ConverterBase()
Creates a new instance of ConverterBase |
|
ConverterBase(Converter nextConverter)
Constructor that takes the next Converter in the decorator chain |
|
| Method Summary | |
Converter |
createInstance()
|
protected abstract Converter |
createInstance(Converter nextConverter)
This method returns the usable copy of this object. |
protected java.lang.Object |
decoratorConvert(java.lang.Object inputObj)
This method calls the decorator chain of Converters. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.fdsapi.Converter |
convert |
| Constructor Detail |
public ConverterBase()
public ConverterBase(Converter nextConverter)
| Method Detail |
protected java.lang.Object decoratorConvert(java.lang.Object inputObj)
public Converter createInstance()
createInstance in interface Converterprotected abstract Converter createInstance(Converter nextConverter)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||