Package picocli
Class CommandLine.Model.CommandUserObject
- java.lang.Object
-
- picocli.CommandLine.Model.CommandUserObject
-
- All Implemented Interfaces:
CommandLine.Model.IGetter,CommandLine.Model.IScope,CommandLine.Model.ISetter
- Enclosing class:
- CommandLine.Model
static class CommandLine.Model.CommandUserObject extends java.lang.Object implements CommandLine.Model.IScope
-
-
Field Summary
Fields Modifier and Type Field Description private CommandLine.Model.CommandSpeccommandSpecprivate CommandLine.IFactoryfactoryprivate java.lang.Objectinstanceprivate java.lang.Class<?>type
-
Constructor Summary
Constructors Modifier Constructor Description privateCommandUserObject(java.lang.Object objectOrClass, CommandLine.IFactory factory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CommandLine.Model.CommandUserObjectcopy()static CommandLine.Model.CommandUserObjectcreate(java.lang.Object userObject, CommandLine.IFactory factory)<T> Tget()Returns the current value of the binding.java.lang.ObjectgetInstance()java.lang.Class<?>getType()booleanisMethod()booleanisProxyClass()<T> Tset(T value)Sets the new value of the option or positional parameter.java.lang.StringtoString()
-
-
-
Field Detail
-
factory
private final CommandLine.IFactory factory
-
instance
private java.lang.Object instance
-
type
private java.lang.Class<?> type
-
commandSpec
private CommandLine.Model.CommandSpec commandSpec
-
-
Constructor Detail
-
CommandUserObject
private CommandUserObject(java.lang.Object objectOrClass, CommandLine.IFactory factory)
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
copy
public CommandLine.Model.CommandUserObject copy()
-
create
public static CommandLine.Model.CommandUserObject create(java.lang.Object userObject, CommandLine.IFactory factory)
-
getInstance
public java.lang.Object getInstance()
-
getType
public java.lang.Class<?> getType()
-
isMethod
public boolean isMethod()
-
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)
-
isProxyClass
public boolean isProxyClass()
-
-