|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.mmm.util.cli.base.CliParameterContainer
public abstract class CliParameterContainer
This is the abstract base class for a container with the metadata of a
CLI-parameter. A parameter is either an
option or an
argument.
CliArgumentContainer,
CliOptionContainer| Field Summary | |
|---|---|
private PojoPropertyAccessorNonArg |
getter
|
private PojoPropertyAccessorOneArg |
setter
|
private ValueValidator<Object> |
validator
|
| Constructor Summary | |
|---|---|
CliParameterContainer(PojoPropertyAccessorOneArg setter,
PojoPropertyAccessorNonArg getter,
ValueValidator validator)
The constructor. |
|
| Method Summary | |
|---|---|
abstract CliContainerStyle |
getContainerStyle(CliStyle cliStyle)
This method gets the style of this parameter. |
PojoPropertyAccessorNonArg |
getGetter()
This method gets the accessor used to
get the value of the according option or argument. |
protected abstract String |
getName()
This method gets the name of the option or argument. |
protected abstract Annotation |
getParameterAnnotation()
This method gets the annotation with the metadata of the option or
argument. |
PojoPropertyAccessorOneArg |
getSetter()
This method gets the accessor used to
set the value of the according option or argument. |
ValueValidator<Object> |
getValidator()
This method gets the ValueValidator. |
boolean |
isArrayMapOrCollection()
This method determines if the property-type of the
setter is a container-type (an array,
Collection or Map). |
protected static boolean |
isArrayMapOrCollection(Class<?> type)
This method determines if the given type is a container-type
(an array, Collection or Map). |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final PojoPropertyAccessorOneArg setter
getSetter()private final PojoPropertyAccessorNonArg getter
getGetter()private final ValueValidator<Object> validator
getValidator()| Constructor Detail |
|---|
public CliParameterContainer(PojoPropertyAccessorOneArg setter,
PojoPropertyAccessorNonArg getter,
ValueValidator validator)
setter - is the setter.getter - is the getter.validator - is the validator.| Method Detail |
|---|
public PojoPropertyAccessorOneArg getSetter()
accessor used to
set the value of the according option or argument.
setter.public PojoPropertyAccessorNonArg getGetter()
accessor used to
get the value of the according option or argument.
getter or null
if NOT available.protected abstract String getName()
option or argument.
protected abstract Annotation getParameterAnnotation()
option or
argument.
Annotation.public ValueValidator<Object> getValidator()
ValueValidator.
public boolean isArrayMapOrCollection()
property-type of the
setter is a container-type (an array,
Collection or Map).
true if the
property-type
is a container-type.CliValueContainer.isArrayMapOrCollection()protected static boolean isArrayMapOrCollection(Class<?> type)
type is a container-type
(an array, Collection or Map).
type - is the Class to check.
true if the given type is a
container-type.CliValueContainer.isArrayMapOrCollection()public String toString()
toString in class Objectpublic abstract CliContainerStyle getContainerStyle(CliStyle cliStyle)
style of this parameter. If
the style of the parameter-annotation (
CliArgument.containerStyle() or
CliOption.containerStyle()) is
CliContainerStyle.DEFAULT this method will return
CliStyle.containerStyle().
cliStyle - TODO
style for this parameter.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||