Skip to content

converter

h908714124 edited this page Aug 25, 2021 · 16 revisions

The @Parameter and @Option annotations do not have boolean attributes like required or optional. Instead, the multiplicity is determined by the return type of the annotated method.

Multiplicity table

return type Multiplicity Arity (if option)
boolean 0..1 (optional) nullary(*)
Optional<A> 0..1 (optional) unary
Optional{Int,Long,Double} 0..1 (optional) unary
List<A> 0..* (repeatable) unary
A (exact match) 1 (required) unary

where A is either one of the auto types, or, if the converter attribute is present, the return type of the converter.

(*) only available when the converter attribute is absent

Clone this wiki locally