- Type Parameters:
T
- the type of the converter
- All Superinterfaces:
FromStringConverter<T>
,StringConverter<T>
,ToStringConverter<T>
Interface defining conversion to and from a
String
together with the type.
TypedStringConverter is an interface and must be implemented with care. Implementations must be immutable and thread-safe.
- Since:
- 1.7
-
Method Summary
Modifier and TypeMethodDescriptionClass
<?> Gets the effective type that the converter works on.default TypedStringConverter
<Object> Returns this converter with the generics removed.Methods inherited from interface org.joda.convert.FromStringConverter
convertFromString
Methods inherited from interface org.joda.convert.ToStringConverter
convertToString
-
Method Details
-
getEffectiveType
Class<?> getEffectiveType()Gets the effective type that the converter works on.For example, if a class declares the
FromString
andToString
then the effective type of the converter is that class. If a subclass is queried for a converter, then the effective type is that of the superclass.- Returns:
- the effective type
-
withoutGenerics
Returns this converter with the generics removed.This returns
this
cast to remove the generics. This is designed for framework usage where the generics are unknown'?'. The returned type is declared withObject
instead of '?' to allow theToStringConverter
to be invoked.- Returns:
- this converter, with a different type signature
-