Annotation Interface TimeSpanOption
@OptionDetailAnnotation(applicableTo={java.lang.Integer.class,java.lang.Long.class,TimeSpan.class})
@Documented
@Retention(RUNTIME)
@Target({FIELD,METHOD})
public @interface TimeSpanOption
This is an annotation for all integer options that specify some sort of time duration (e.g., a
timeout). Values for options with this annotation can be given with units. Examples: 10s 5min 3h
Supported units are "ns", "ms", "s", "min", and "h". Microseconds are not supported.
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThe unit which should be assumed when the user does not explicitly specify a unit.longAn optional maximum value for this option.longAn optional minimum value for this option.
-
Element Details
-
codeUnit
TimeUnit codeUnitThe unit which will be used to write the value from the user into the annotated field if the field is of type int or long. This is also the unit of the default value of this option (if one is given), and of the minimum and maximum value!
-
-
-
defaultUserUnit
TimeUnit defaultUserUnitThe unit which should be assumed when the user does not explicitly specify a unit.- Default:
- SECONDS
-
min
long minAn optional minimum value for this option. The unit of the minimum iscodeUnit().- Default:
- -9223372036854775808L
-
max
long maxAn optional maximum value for this option. The unit of the maximum iscodeUnit().- Default:
- 9223372036854775807L
-