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, getParameterContainerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetValuepublic 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)
CliValueContainervalue 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_OCCURRENCEpublic final boolean isArrayMapOrCollection()
isArrayMapOrCollection in interface CliValueContainerisArrayMapOrCollection in class AbstractCliValueContainertrue 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.