Interface ArgumentConverter
-
- All Known Implementing Classes:
CombinationArgumentConverter,DelegatingModelBasedArgumentConverter,ModelBasedArgumentConverter,ParameterArgumentConverter,TupleListArgumentConverter,ValueArgumentConverter
public interface ArgumentConverterDefines an interface which can be used to convert arguments to different representation forms. Internally, this is used to convert engine representations to testModel representations (which I should not have written here since engine does not know about testModel, but meh...).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanConvert(Object argument)Checks whether the given argument can be converted by thisArgumentConverter.Objectconvert(Object argument)Converts the given argument ifcanConvert(Object)returnedtrue.
-
-
-
Method Detail
-
canConvert
boolean canConvert(Object argument)
Checks whether the given argument can be converted by thisArgumentConverter. Iftrueis returned from this method, the result returned byconvert(Object)is guaranteed to "make sense". Otherwise, the result is not defined an anyExceptionmay be thrown.- Parameters:
argument- the argument for which a possible conversion is checked- Returns:
- whether the argument can be converted using
convert(Object)
-
convert
Object convert(Object argument)
Converts the given argument ifcanConvert(Object)returnedtrue. Otherwise the behaviour is intentionally undefined but is it better to throw anException, since returning a nonsensical could make debugging more complex for a user.- Parameters:
argument- the argument which should be converted- Returns:
- the converted form of the argument
-
-