to.etc.domui.converter
Class DateConverterFactory
java.lang.Object
to.etc.domui.converter.DateConverterFactory
- All Implemented Interfaces:
- IConverterFactory
public class DateConverterFactory
- extends java.lang.Object
- implements IConverterFactory
This converter factory accepts java.util.Date types and returns an appropriate
Date converter. By default (if insufficient metadata is available) it will return
a DateTime converter.
- Author:
- Frits Jalvingh
Created on Jul 29, 2009
Method Summary |
int |
accept(java.lang.Class<?> clz,
PropertyMetaModel<?> pmm)
This must decide whether to accept the class and property model pair. |
|
createConverter(java.lang.Class<X> clz,
PropertyMetaModel<X> pmm)
Return the converter which properly converts the specified class and meta model. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DateConverterFactory
public DateConverterFactory()
accept
public int accept(java.lang.Class<?> clz,
PropertyMetaModel<?> pmm)
- Description copied from interface:
IConverterFactory
- This must decide whether to accept the class and property model pair. This must return a score which is
used to decide the best converter to use; the higher the score the better the chance of this converter
being used.
If this converter does not accept the class it must return -1. If the class is accepted but
the PropertyMetaModel passed was unacceptable this must return 0.
- Specified by:
accept
in interface IConverterFactory
- Returns:
createConverter
public <X,T extends IConverter<X>> T createConverter(java.lang.Class<X> clz,
PropertyMetaModel<X> pmm)
- Description copied from interface:
IConverterFactory
- Return the converter which properly converts the specified class and meta model.
- Specified by:
createConverter
in interface IConverterFactory
- Returns:
- See Also:
IConverterFactory.createConverter(java.lang.Class, to.etc.domui.component.meta.PropertyMetaModel)