public static class CommandlineParameter.Builder extends Object
CommandlineParameter
builderConstructor and Description |
---|
Builder(String singleLetter,
String fullName)
Constructs a
CommandlineParameter builder. |
Modifier and Type | Method and Description |
---|---|
CommandlineParameter |
build()
Creates a concrete
CommandlineParameter from particular builder |
CommandlineParameter.Builder |
defaultValue(String defaultValue)
Sets default value for the parameter option
|
CommandlineParameter.Builder |
description(String description)
Sets the description for the parameter option
|
CommandlineParameter.Builder |
options(String... options)
Sets possible options for the parameter option
|
CommandlineParameter.Builder |
requireArguments(boolean required)
Sets whether particular parameter option requires arguments
|
CommandlineParameter.Builder |
required(boolean required)
Sets whether particular parameter option is required - if yes then it's mandatory to set it's value or
provide default.
|
CommandlineParameter.Builder |
secret()
Sets the parameter option as secret which influences how it will be obtained in interactive mode (won't be
printed, useful for passwords)
|
CommandlineParameter.Builder |
type(Class type) |
CommandlineParameter.Builder |
valueDependentParametersProvider(Function<String,List<CommandlineParameter>> provider) |
public Builder(String singleLetter, String fullName)
CommandlineParameter
builder. It takes as parameters both "single-letter" and
"full-name" of which one is mandatorysingleLetter
- single letter identification of the optionfullName
- full named identification of the optionpublic CommandlineParameter build()
CommandlineParameter
from particular builderCommandlineParameter
public CommandlineParameter.Builder defaultValue(String defaultValue)
defaultValue
- default value to be setpublic CommandlineParameter.Builder description(String description)
description
- description to be setpublic CommandlineParameter.Builder options(String... options)
options
- array of possible optionspublic CommandlineParameter.Builder requireArguments(boolean required)
required
- whether the option needs parameterpublic CommandlineParameter.Builder required(boolean required)
required
- whether the option is requiredpublic CommandlineParameter.Builder secret()
public CommandlineParameter.Builder type(Class type)
public CommandlineParameter.Builder valueDependentParametersProvider(Function<String,List<CommandlineParameter>> provider)
Copyright © 2004–2021 "Tigase, Inc.". All rights reserved.