Class JavaTimeArgumentConverter
- java.lang.Object
-
- org.junit.jupiter.params.converter.AnnotationBasedArgumentConverter<JavaTimeConversionPattern>
-
- org.junit.jupiter.params.converter.JavaTimeArgumentConverter
-
- All Implemented Interfaces:
java.util.function.Consumer<JavaTimeConversionPattern>,ArgumentConverter,AnnotationConsumer<JavaTimeConversionPattern>
class JavaTimeArgumentConverter extends AnnotationBasedArgumentConverter<JavaTimeConversionPattern>
- Since:
- 5.0
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Map<java.lang.Class<?>,java.time.temporal.TemporalQuery<?>>TEMPORAL_QUERIES
-
Constructor Summary
Constructors Constructor Description JavaTimeArgumentConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Objectconvert(java.lang.Object input, java.lang.Class<?> targetClass, JavaTimeConversionPattern annotation)Convert the suppliedsourceobject into the suppliedtargetType, based on metadata in the provided annotation.-
Methods inherited from class org.junit.jupiter.params.converter.AnnotationBasedArgumentConverter
accept, convert, convert
-
-
-
-
Method Detail
-
convert
protected java.lang.Object convert(java.lang.Object input, java.lang.Class<?> targetClass, JavaTimeConversionPattern annotation)Description copied from class:AnnotationBasedArgumentConverterConvert the suppliedsourceobject into the suppliedtargetType, based on metadata in the provided annotation.- Specified by:
convertin classAnnotationBasedArgumentConverter<JavaTimeConversionPattern>- Parameters:
input- the source object to convert; may benulltargetClass- the target type the source object should be converted into; nevernullannotation- the annotation to process; nevernull- Returns:
- the converted object; may be
nullbut only if the target type is a reference type
-
-