Package picocli
Class CommandLine.Model.FieldBinding
java.lang.Object
picocli.CommandLine.Model.FieldBinding
- All Implemented Interfaces:
CommandLine.Model.IGetter,CommandLine.Model.IScoped,CommandLine.Model.ISetter
- Enclosing class:
CommandLine.Model
static class CommandLine.Model.FieldBinding
extends Object
implements CommandLine.Model.IGetter, CommandLine.Model.ISetter, CommandLine.Model.IScoped
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFieldBinding(Object scope, Field field) FieldBinding(CommandLine.Model.IScope scope, Field field) -
Method Summary
Modifier and TypeMethodDescription<T> Tget()Returns the current value of the binding.getScope()Get theCommandLine.Model.IScopeinstance.<T> Tset(T value) Sets the new value of the option or positional parameter.toString()
-
Field Details
-
scope
-
field
-
-
Constructor Details
-
FieldBinding
-
FieldBinding
FieldBinding(CommandLine.Model.IScope scope, Field field)
-
-
Method Details
-
getScope
Description copied from interface:CommandLine.Model.IScopedGet theCommandLine.Model.IScopeinstance.- Specified by:
getScopein interfaceCommandLine.Model.IScoped- Returns:
CommandLine.Model.IScopeinstance
-
get
Description copied from interface:CommandLine.Model.IGetterReturns the current value of the binding. For multi-value options and positional parameters, this method returns an array, collection or map to add values to.- Specified by:
getin interfaceCommandLine.Model.IGetter- Throws:
CommandLine.PicocliException- if a problem occurred while obtaining the current value
-
set
Description copied from interface:CommandLine.Model.ISetterSets the new value of the option or positional parameter.- Specified by:
setin interfaceCommandLine.Model.ISetter- Type Parameters:
T- type of the value- Parameters:
value- the new value of the option or positional parameter- Returns:
- the previous value of the binding (if supported by this binding)
- Throws:
CommandLine.PicocliException- if a problem occurred while setting the new value
-
toString
-