Class StringConverter
- java.lang.Object
-
- ru.vyarus.dropwizard.guice.module.context.option.mapper.StringConverter
-
public final class StringConverter extends java.lang.Object
Simple converter from string source to target type. Supports:- String
- Boolean
- Integer
- Double
- Short
- Byte
- Enum type value (when target type is exact enum type and string is enum constant)
- Enum recognition (when target type is generic Enum and string is "fullEnumClass.constantName"
Special support for
EnumSet
: it must be a list of fully qualified enum values (enumClass.enumValue).- Since:
- 27.04.2018
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <V> V
convert(java.lang.Class<V> target, java.lang.String value)
-