public abstract class CliParameterContainer extends Object
option
or an argument
.CliArgumentContainer
,
CliOptionContainer
Modifier and Type | Field and Description |
---|---|
private PojoPropertyAccessorNonArg |
getter |
private PojoPropertyAccessorOneArg |
setter |
private ValueValidator<?> |
validator |
Constructor and Description |
---|
CliParameterContainer(PojoPropertyAccessorOneArg setter,
PojoPropertyAccessorNonArg getter,
ValueValidator<?> validator)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract CliContainerStyle |
getContainerStyle(CliStyle cliStyle)
This method gets the
style of this parameter. |
PojoPropertyAccessorNonArg |
getGetter()
|
protected abstract String |
getName()
|
protected abstract Annotation |
getParameterAnnotation()
|
PojoPropertyAccessorOneArg |
getSetter()
|
ValueValidator<?> |
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)
|
String |
toString() |
private final PojoPropertyAccessorOneArg setter
private final PojoPropertyAccessorNonArg getter
private final ValueValidator<?> validator
public CliParameterContainer(PojoPropertyAccessorOneArg setter, PojoPropertyAccessorNonArg getter, ValueValidator<?> validator)
public PojoPropertyAccessorOneArg getSetter()
setter
.public PojoPropertyAccessorNonArg getGetter()
getter
or null
if NOT available.protected abstract String getName()
protected abstract Annotation getParameterAnnotation()
Annotation
.public ValueValidator<?> 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 the Class
to check.true
if the given type
is a container-type.CliValueContainer.isArrayMapOrCollection()
public 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
- TODOstyle
for this parameter.Copyright © 2001–2016 mmm-Team. All rights reserved.