cucumber.runtime.converters
Class ConverterWithFormat<T>
java.lang.Object
cucumber.runtime.converters.ConverterWithFormat<T>
- All Implemented Interfaces:
- com.thoughtworks.xstream.converters.ConverterMatcher, com.thoughtworks.xstream.converters.SingleValueConverter
- Direct Known Subclasses:
- ConverterWithEnumFormat, ConverterWithNumberFormat, TimeConverter
public abstract class ConverterWithFormat<T>
- extends Object
- implements com.thoughtworks.xstream.converters.SingleValueConverter
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConverterWithFormat
public ConverterWithFormat(Class[] convertibleTypes)
fromString
public T fromString(String string)
- Specified by:
fromString
in interface com.thoughtworks.xstream.converters.SingleValueConverter
getFormats
protected abstract List<? extends Format> getFormats()
- Returns:
- A Format to parse the argument
transform
protected Object transform(Format format,
String argument)
- Parses a value using one of the java.util.text format classes.
- Parameters:
format
- The format to useargument
- The object to parse
- Returns:
- The object
toString
public String toString(Object obj)
- Specified by:
toString
in interface com.thoughtworks.xstream.converters.SingleValueConverter
canConvert
public boolean canConvert(Class type)
- Specified by:
canConvert
in interface com.thoughtworks.xstream.converters.ConverterMatcher
Copyright © 2012. All Rights Reserved.