Closed rvesse closed 9 years ago
@Port
- Indicates that an integer field is expected to receive a value that is a port. Include ability to restrict to non-priveleged ports and control whether 0
may be passed to indicate system determined portThe numeric ranges and @AllowedValues
are now done on the restrictions
branch
The @Port
restriction is now added to the restrictions
branch
Latest additions:
@RequireSome
and @RequireOnlyOne
from requiring some/exactly one from a group of options@MaxOccurrences
, @MinOccurrences
and @Once
for setting max/min occurrences of an option/argumentsSome more ideas for string specific restrictions:
@Pattern
- Enforce matching of a regular expression@NotEmpty
- Require a non-empty string@NotBlank
- Require a non-blank string@LengthRange
- Restrict the length of the stringImplemented the various string restrictions with some minor changes, also got @LexicalRange
implemented
Completed and merged to 2.x branch
Now #25 is complete we can start adding additional restrictions, the following are the suggestions:
@Once
,@MaxOccurrences
- Limit the number of times an option may be specified,@Once
is synonym for@MaxOccurrences(max = 1)
@MutuallyExclusiveWith
- May not be specified if some other option(s) are specified@RequireSome
- Require at least one of some set of options@RequiredIf
- Required if another option is present@DoubleRange
,@FloatRange
,@LongRange
,@ShortRange
,@ByteRange
- Numeric ranges@LexicalRange
- Lexical range@AllowedValues
- Similar to@AllowedRawValues
but given values are converted into Java types before being compared