net.sf.mmm.util.value.base
Class AbstractComposedValueConverter
java.lang.Object
net.sf.mmm.util.component.AbstractComponent
net.sf.mmm.util.component.AbstractLoggable
net.sf.mmm.util.value.base.AbstractValueConverter<Object,Object>
net.sf.mmm.util.value.base.AbstractComposedValueConverter
- All Implemented Interfaces:
- ComposedValueConverter, ValueConverter<Object,Object>
- Direct Known Subclasses:
- ComposedValueConverterImpl
public abstract class AbstractComposedValueConverter
- extends AbstractValueConverter<Object,Object>
- implements ComposedValueConverter
This is the abstract base implementation of the
ComposedValueConverter interface.
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractComposedValueConverter
public AbstractComposedValueConverter()
- The constructor.
getSourceType
public final Class<Object> getSourceType()
- This the type of the value accepted by this converter. Use
Object
if you want to accept any value. A very common
source-type is String.
- Specified by:
getSourceType in interface ValueConverter<Object,Object>
- Returns:
- the source-type.
getTargetType
public final Class<Object> getTargetType()
- Is the guaranteed return-type of the
conversion. This information
is used externally to choose the most specific ValueConverter that
is appropriate for the conversion.
E.g. a generic converter can have Object as
target-type while a specific converter may have
Collection as target-type. Now
if an object (compliant with the source-type)
needs to be converted to a Collection or
List, the specific converter is used while for other
objects the generic converter is chosen.
Please note that the target-type is often more
general than the actual
returned result. So a
ValueConverter that converts a comma-separated String to an
ArrayList will typically declare List
as target-type.
- Specified by:
getTargetType in interface ValueConverter<Object,Object>
- Returns:
- the target-type.
Copyright © 2001-2008 mmm-Team. All Rights Reserved.