Package picocli

Class CommandLine.BuiltIn.TimeZoneConverter

java.lang.Object
picocli.CommandLine.BuiltIn.TimeZoneConverter
All Implemented Interfaces:
CommandLine.ITypeConverter<TimeZone>
Enclosing class:
CommandLine.BuiltIn

static class CommandLine.BuiltIn.TimeZoneConverter extends Object implements CommandLine.ITypeConverter<TimeZone>
  • Constructor Details

    • TimeZoneConverter

      TimeZoneConverter()
  • Method Details

    • convert

      public TimeZone convert(String s) throws Exception
      Description copied from interface: CommandLine.ITypeConverter
      Converts the specified command line argument value to some domain object.
      Specified by:
      convert in interface CommandLine.ITypeConverter<TimeZone>
      Parameters:
      s - the command line argument String value
      Returns:
      the resulting domain object
      Throws:
      Exception - an exception detailing what went wrong during the conversion. Any exception thrown from this method will be caught and shown to the end user. An example error message shown to the end user could look something like this: Invalid value for option '--some-option': cannot convert 'xxxinvalidinput' to SomeType (java.lang.IllegalArgumentException: Invalid format: must be 'x:y:z' but was 'xxxinvalidinput')