Class EnvironmentDefaultProvider

  • All Implemented Interfaces:
    picocli.CommandLine.IDefaultValueProvider

    public class EnvironmentDefaultProvider
    extends java.lang.Object
    implements picocli.CommandLine.IDefaultValueProvider
    Provides default values for command options.

    Considers all "long" options (starting with --), using the conversion "NESSIE_GC_" + optionName..substring(2).replace('-', '_').toUpperCase().

    For example, the default value for the command line option --jdbc-passowrd is derived from the environment variable NESSIE_GC_JDBC_PASSWORD.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String defaultValue​(picocli.CommandLine.Model.ArgSpec argSpec)  
      • Methods inherited from class java.lang.Object

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

      • EnvironmentDefaultProvider

        public EnvironmentDefaultProvider()
    • Method Detail

      • defaultValue

        public java.lang.String defaultValue​(picocli.CommandLine.Model.ArgSpec argSpec)
        Specified by:
        defaultValue in interface picocli.CommandLine.IDefaultValueProvider