@Retention(value=RUNTIME) @Target(value=ANNOTATION_TYPE) public @interface Option
Parameter
structure.Modifier and Type | Optional Element and Description |
---|---|
String |
argument
A description on what kind of value is used for this option.
|
String |
description
A description of the param.
|
boolean |
hasMultipleValues
Set to true if this option can have many values separated by valueSeparator.
|
boolean |
hasValue
Is this option just a flag or do it contain a value
By default it is mapped as a flag
|
boolean |
isProperty
Specify if this option is of the type:
-Dname1=value1 -Dname2=value2.
|
String |
longName
An optional long name.
|
char |
name
The name of the default option param.
|
boolean |
required
Specify if this option is required
|
Class<?> |
type
Option type, default is String.class
|
char |
valueSeparator
If set will force the option to be of the form:
name[separator]value
As an example, if we want to create an option like: --foo bar1,bar2
@Option(longName='foo', valueSeparator=',') |
public abstract String longName
public abstract String description
public abstract boolean hasValue
public abstract String argument
public abstract char valueSeparator
@Option(longName='foo', valueSeparator=',')
public abstract boolean isProperty
public abstract boolean hasMultipleValues
valueSeparator
is here set to ','public abstract Class<?> type
Copyright © 2016 JBoss by Red Hat. All rights reserved.