class JavaTimeArgumentConverter extends SimpleArgumentConverter implements AnnotationConsumer<JavaTimeConversionPattern>
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
pattern |
private static java.util.Map<java.lang.Class<?>,java.time.temporal.TemporalQuery<?>> |
TEMPORAL_QUERIES |
Constructor and Description |
---|
JavaTimeArgumentConverter() |
Modifier and Type | Method and Description |
---|---|
void |
accept(JavaTimeConversionPattern annotation) |
java.lang.Object |
convert(java.lang.Object input,
java.lang.Class<?> targetClass)
Convert the supplied
source object into to the supplied
targetType . |
convert
private static final java.util.Map<java.lang.Class<?>,java.time.temporal.TemporalQuery<?>> TEMPORAL_QUERIES
private java.lang.String pattern
public void accept(JavaTimeConversionPattern annotation)
accept
in interface java.util.function.Consumer<JavaTimeConversionPattern>
public java.lang.Object convert(java.lang.Object input, java.lang.Class<?> targetClass) throws ArgumentConversionException
SimpleArgumentConverter
source
object into to the supplied
targetType
.convert
in class SimpleArgumentConverter
input
- the source object to convert; may be null
targetClass
- the target type the source object should be converted
into; never null
null
but only if the target
type is a reference typeArgumentConversionException
- in case an error occurs during the
conversion