Class JavaTimeArgumentConverter

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String pattern  
      private static java.util.Map<java.lang.Class<?>,​java.time.temporal.TemporalQuery<?>> TEMPORAL_QUERIES  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void accept​(JavaTimeConversionPattern annotation)  
      java.lang.Object convert​(java.lang.Object input, java.lang.Class<?> targetClass)
      Convert the supplied source object into the supplied targetType.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.function.Consumer

        andThen
    • Field Detail

      • TEMPORAL_QUERIES

        private static final java.util.Map<java.lang.Class<?>,​java.time.temporal.TemporalQuery<?>> TEMPORAL_QUERIES
      • pattern

        private java.lang.String pattern
    • Constructor Detail

      • JavaTimeArgumentConverter

        JavaTimeArgumentConverter()
    • Method Detail

      • convert

        public java.lang.Object convert​(java.lang.Object input,
                                        java.lang.Class<?> targetClass)
                                 throws ArgumentConversionException
        Description copied from class: SimpleArgumentConverter
        Convert the supplied source object into the supplied targetType.
        Specified by:
        convert in class SimpleArgumentConverter
        Parameters:
        input - the source object to convert; may be null
        targetClass - the target type the source object should be converted into; never null
        Returns:
        the converted object; may be null but only if the target type is a reference type
        Throws:
        ArgumentConversionException - in case an error occurs during the conversion