@Retention(value=RUNTIME) @Target(value=FIELD) @Beta @PublicAPI public @interface Parameter
Marks fields of typically parameter objects / builders which are intended to be exposed to the user (through reflection based dynamic API discovery) to modify
Note that annotated elements (fields) must be annotated with Description
annotation
Note that an associated setter method named from the annotated field must exist. Setting the parameter value is
done through the setter method. (eg. if an int
field called count
is annotated as a
Parameter
there must be a method with signature int count(int)
to be used as a setter. The
method naming convention reflects the typical usage in builders.
Please note that this annotation is marked with @Beta annotation, so it can be subject of incompatible changes or removal in later releases.
Modifier and Type | Required Element and Description |
---|---|
int |
order
Order info for the listed parameters.
|
Modifier and Type | Optional Element and Description |
---|---|
double |
maxDouble
Maximal double value accepted (inclusive).
|
long |
maxLong
Maximal long value accepted (inclusive).
|
double |
minDouble
Minimal double value accepted (inclusive).
|
long |
minLong
Minimal long value accepted (inclusive).
|
public abstract int order
The parameter discovery will list parameters by this value in increasing order.
public abstract double minDouble
Double.NEGATIVE_INFINITY
is specified for floating point parameter types.double
value acceptedpublic abstract double maxDouble
Double.POSITIVE_INFINITY
is specified for floating point parameter types.double
value acceptedpublic abstract long minLong
Long.MIN_VALUE
is specified for fixed point parameter types. Note that value is not
specified for unconstrained int
parameters.long
value acceptedpublic abstract long maxLong
Long.MAX_VALUE
is specified for fixed point parameter types. Note that value is not
specified for unconstrained int
parameters.long
value accepted