Interface IDefaultProvider

All Known Implementing Classes:
EnvironmentVariableDefaultProvider, PropertyFileDefaultProvider

public interface IDefaultProvider
Allows the specification of default values.
  • Method Details

    • getDefaultValueFor

      String getDefaultValueFor(String optionName)
      Parameters:
      optionName - The name of the option as specified in the names() attribute of the @Parameter option (e.g. "-file").
      Returns:
      the default value for this option.
    • sequenceOf

      static IDefaultProvider sequenceOf(IDefaultProvider... defaultProviders)
      Returns a default provider which attempts to query a default value from a sequence of default providers. The first produced non-null value will get finally returned.
      Parameters:
      defaultProviders - A sorted sequence of default providers.
      Returns:
      The first non-null value provided, or null if all providers returned null.