public final class EnvironmentVariableDefaultProvider extends Object implements IDefaultProvider
-/ mandates that options MUST start with either a dash or a slash.
Options can have values separated by whitespace.
Values can contain whitespace as long as they are single-quoted or double-quoted.
Otherwhise whitespace identifies the end of a value.| Constructor and Description |
|---|
EnvironmentVariableDefaultProvider()
Creates a default provider reading the environment variable
JCOMMANDER_OPTS using the prefixes pattern -/. |
EnvironmentVariableDefaultProvider(String environmentVariableName,
String optionPrefixes)
Creates a default provider reading the specified environment variable using the specified prefixes pattern.
|
public EnvironmentVariableDefaultProvider()
JCOMMANDER_OPTS using the prefixes pattern -/.public EnvironmentVariableDefaultProvider(String environmentVariableName, String optionPrefixes)
environmentVariableName - The name of the environment variable to read (e. g. "JCOMMANDER_OPTS"). Must not be null.optionPrefixes - A set of characters used to indicate the start of an option (e. g. "-/" if option names may start with either dash or slash). Must not be null.public final String getDefaultValueFor(String optionName)
getDefaultValueFor in interface IDefaultProvideroptionName - The name of the option as specified in the names() attribute
of the @Parameter option (e.g. "-file").Copyright © 2025. All rights reserved.