Class AbstractConfigurationBuilder<T extends Configuration>

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      protected static interface  AbstractConfigurationBuilder.Param
      A single application parameter supported by this builder.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      T build​(java.lang.String[] args)
      Builds the Configuration from the given command-line arguments.
      protected abstract T build0​(T config)
      Called by build(String[]) after verifying that all required options have been set.
      protected abstract java.util.Collection<AbstractConfigurationBuilder.Param> getParams()
      Returns the valid parameters supported by the configuration.
      protected abstract T newConfiguration()
      Creates a new configuration instance which will be used as the target for command-line arguments.
      void printUsage()
      Prints the command-line usage for the application based on the options supported by this builder.
      • Methods inherited from class java.lang.Object

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

      • AbstractConfigurationBuilder

        public AbstractConfigurationBuilder()
    • Method Detail

      • newConfiguration

        protected abstract T newConfiguration()
        Creates a new configuration instance which will be used as the target for command-line arguments.
      • build0

        protected abstract T build0​(T config)
        Called by build(String[]) after verifying that all required options have been set. Performs any final validation and modifications to the configuration. If successful, returns the fully built configuration.