Package picocli

Class CommandLine.BuiltIn.ISO8601TimeConverter

  • All Implemented Interfaces:
    CommandLine.ITypeConverter<java.lang.Object>
    Enclosing class:
    CommandLine.BuiltIn

    static class CommandLine.BuiltIn.ISO8601TimeConverter
    extends java.lang.Object
    implements CommandLine.ITypeConverter<java.lang.Object>
    Converts text in any of the following formats to a java.sql.Time: HH:mm, HH:mm:ss, HH:mm:ss.SSS, HH:mm:ss,SSS. Other formats result in a ParameterException.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.reflect.Constructor<?> constructor  
    • Constructor Summary

      Constructors 
      Constructor Description
      ISO8601TimeConverter​(java.lang.reflect.Constructor<?> constructor)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object convert​(java.lang.String value)
      Converts the specified command line argument value to some domain object.
      private java.lang.Object createTime​(long epochMillis)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • constructor

        private final java.lang.reflect.Constructor<?> constructor
    • Constructor Detail

      • ISO8601TimeConverter

        ISO8601TimeConverter​(java.lang.reflect.Constructor<?> constructor)
                      throws java.lang.NoSuchMethodException
        Throws:
        java.lang.NoSuchMethodException
    • Method Detail

      • convert

        public java.lang.Object convert​(java.lang.String value)
        Description copied from interface: CommandLine.ITypeConverter
        Converts the specified command line argument value to some domain object.
        Specified by:
        convert in interface CommandLine.ITypeConverter<java.lang.Object>
        Parameters:
        value - the command line argument String value
        Returns:
        the resulting domain object
      • createTime

        private java.lang.Object createTime​(long epochMillis)