|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.mmm.util.cli.base.AbstractCliValueContainer
net.sf.mmm.util.cli.base.AbstractCliValueContainerContainer
public abstract class AbstractCliValueContainerContainer
This is the abstract base class for a CliValueContainer
that holds a
container-value
.
Field Summary | |
---|---|
private boolean |
valueAlreadySet
|
Constructor Summary | |
---|---|
AbstractCliValueContainerContainer(CliParameterContainer parameterContainer,
CliState cliState,
CliParserDependencies dependencies,
org.slf4j.Logger logger)
The constructor. |
Method Summary | |
---|---|
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. |
Methods inherited from class net.sf.mmm.util.cli.base.AbstractCliValueContainer |
---|
getCliState, getDependencies, getLogger, getParameterContainer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.mmm.util.cli.base.CliValueContainer |
---|
getValue |
Field Detail |
---|
private boolean valueAlreadySet
setValueInternal(String, char, GenericType)
Constructor Detail |
---|
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
.Method Detail |
---|
public void setValue(String argument)
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |