net.sf.mmm.util.cli.base
Class CliClassContainer.CliModeFormatter
java.lang.Object
net.sf.mmm.util.cli.base.CliClassContainer.CliModeFormatter
- All Implemented Interfaces:
- SimpleValueConverter<CliModeContainer,String>
- Enclosing class:
- CliClassContainer
protected static final class CliClassContainer.CliModeFormatter
- extends Object
- implements SimpleValueConverter<CliModeContainer,String>
This inner class converts a CliModeContainer to a String.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
protected static final CliClassContainer.CliModeFormatter INSTANCE
- The singleton instance.
CliClassContainer.CliModeFormatter
protected CliClassContainer.CliModeFormatter()
convert
public String convert(CliModeContainer value,
Object valueSource,
Class<? extends String> targetClass)
throws ValueException
- This method converts the given
pojo to the
<TARGET>-type.
- Specified by:
convert in interface SimpleValueConverter<CliModeContainer,String>
- Parameters:
value - is the value to convert.valueSource - describes the source of the value. This may be the
filename where the value was read from, an XPath where the value was
located in an XML document, etc. It is used in exceptions thrown if
something goes wrong. This will help to find the problem easier.targetClass - is the type to convert the value to.
- Returns:
- the converted
value or null if the
conversion is NOT possible. The returned value has to be an
instance of the given
targetType.
- Throws:
ValueException - if the conversion failed (e.g. the given
value is illegal for the given
targetClass).
Copyright © 2001-2010 mmm-Team. All Rights Reserved.