Package picocli
Class CommandLine.Model.ObjectScope
- java.lang.Object
-
- picocli.CommandLine.Model.ObjectScope
-
- All Implemented Interfaces:
CommandLine.Model.IGetter,CommandLine.Model.IScope,CommandLine.Model.ISetter
- Enclosing class:
- CommandLine.Model
static class CommandLine.Model.ObjectScope extends java.lang.Object implements CommandLine.Model.IScope
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Objectvalue
-
Constructor Summary
Constructors Constructor Description ObjectScope(java.lang.Object value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static CommandLine.Model.IScopeasScope(java.lang.Object scope)<T> Tget()Returns the current value of the binding.static booleanhasInstance(CommandLine.Model.IScope scope)static booleanisProxyClass(CommandLine.Model.IScope scope)<T> Tset(T value)Sets the new value of the option or positional parameter.java.lang.StringtoString()static java.lang.ObjecttryGet(CommandLine.Model.IScope scope)
-
-
-
Method Detail
-
isProxyClass
public static boolean isProxyClass(CommandLine.Model.IScope scope)
-
hasInstance
public static boolean hasInstance(CommandLine.Model.IScope scope)
-
get
public <T> T 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
-
set
public <T> T set(T value)
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)
-
tryGet
public static java.lang.Object tryGet(CommandLine.Model.IScope scope)
-
asScope
static CommandLine.Model.IScope asScope(java.lang.Object scope)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-