public abstract class AbstractCliValueContainerContainer extends AbstractCliValueContainer
CliValueContainer
that holds a container-value
.Modifier and Type | Field and Description |
---|---|
private boolean |
valueAlreadySet |
Constructor and Description |
---|
AbstractCliValueContainerContainer(CliParameterContainer parameterContainer,
CliState cliState,
CliParserDependencies dependencies,
org.slf4j.Logger logger)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isArrayMapOrCollection() |
void |
setValue(String argument)
This method sets the
value given as string. |
protected abstract void |
setValueEntry(String entry,
GenericType<?> propertyType)
This method is like
setValue(String) but for a single entry. |
protected abstract void |
setValueInternal(Object containerValue)
This method sets the container value as new object.
|
protected void |
setValueInternal(String argument,
char separator,
GenericType<?> propertyType)
This method parses container value as from a single argument and sets it as new object.
|
getCliState, getDependencies, getLogger, getParameterContainer
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getValue
public AbstractCliValueContainerContainer(CliParameterContainer parameterContainer, CliState cliState, CliParserDependencies dependencies, org.slf4j.Logger logger)
parameterContainer
- is the parameter-container
.cliState
- is the state
.dependencies
- are the dependencies
.logger
- is the logger
.public void setValue(String argument)
CliValueContainer
value
given as string. For the parameter-types array, collection or map
this method may be called multiple times, one for each item.argument
- is the argument from the commandline containing the value.protected void setValueInternal(String argument, char separator, GenericType<?> propertyType)
argument
- is the argument representing the container as string.separator
- is the character used as separator for the container values.propertyType
- is the GenericType
of the property.protected abstract void setValueInternal(Object containerValue)
containerValue
- is the container value to set.protected abstract void setValueEntry(String entry, GenericType<?> propertyType)
setValue(String)
but for a single entry.entry
- is a single collection-entry given as string.propertyType
- is the GenericType
of the container.CliContainerStyle.MULTIPLE_OCCURRENCE
public final boolean isArrayMapOrCollection()
isArrayMapOrCollection
in interface CliValueContainer
isArrayMapOrCollection
in class AbstractCliValueContainer
true
if this is a container for a value of the type array, Collection
or
Map
- false
otherwise.Copyright © 2001–2016 mmm-Team. All rights reserved.