Annotation Interface InRange
@Target({PARAMETER,FIELD,ANNOTATION_TYPE,TYPE_USE})
@Retention(RUNTIME)
@GeneratorConfiguration
public @interface InRange
Mark a parameter of a Property
method with this annotation to constrain the values generated for the
parameter to a given range.
Different generators may use different min/max attribute pairs.
Generators that produce primitive values or values of their wrapper types
will likely want to use the attribute pairs of corresponding type.
Otherwise, a generator can use min() and max(), and
take on the responsibility of converting their string values to values of
the desired type.
-
Optional Element Summary
Optional Elements
-
Element Details
-
minByte
byte minByte- Returns:
- a minimum
bytevalue
- Default:
- (byte)0x80
-
maxByte
byte maxByte- Returns:
- a maximum
bytevalue
- Default:
- (byte)0x7f
-
minShort
short minShort- Returns:
- a minimum
shortvalue
- Default:
- -32768
-
maxShort
short maxShort- Returns:
- a maximum
shortvalue
- Default:
- 32767
-
minChar
char minChar- Returns:
- a minimum
charvalue
- Default:
- '\u0000'
-
maxChar
char maxChar- Returns:
- a maximum
charvalue
- Default:
- '\uffff'
-
minInt
int minInt- Returns:
- a minimum
intvalue
- Default:
- -2147483648
-
maxInt
int maxInt- Returns:
- a maximum
intvalue
- Default:
- 2147483647
-
minLong
long minLong- Returns:
- a minimum
longvalue
- Default:
- -9223372036854775808L
-
maxLong
long maxLong- Returns:
- a maximum
longvalue
- Default:
- 9223372036854775807L
-
minFloat
float minFloat- Returns:
- a minimum
floatvalue
- Default:
- 0.0f
-
maxFloat
float maxFloat- Returns:
- a maximum
floatvalue
- Default:
- 1.0f
-
minDouble
double minDouble- Returns:
- a minimum
doublevalue
- Default:
- 0.0
-
maxDouble
double maxDouble- Returns:
- a maximum
doublevalue
- Default:
- 1.0
-
min
String min- Returns:
- a minimum value, represented in string form
- Default:
- ""
-
max
String max- Returns:
- a maximum value, represented in string form
- Default:
- ""
-
format
String format- Returns:
- a formatting hint, such as a date format string, that generators can use when converting values from strings
- Default:
- ""
-