The Parameter annotation describes some informations needed to characterize
inputs and outputs for discoverers (
IDiscoverer
)
The developer is free to annotate directly a Java field or a getter/setter
method, or both field and getter/setter with a same id.
An input data is supposed to be valued before a discovery is launched : At
least a setter method (preferred) or a public field (discouraged) must be
proposed.
An output data is supposed to be accessed after a discovery treatment : At
least a setter method (preferred) or a public field (discouraged) must be
proposed.
A data both input and output of the discovery must respond to both previous
conditions.
Using the annotation will throw compilation errors in the following cases :
-
annotating a non public field
-
annotating a static field/method
-
annotating a non getter/setter method (e.g. a method which has a java
parameter or returns void)
-
annotating with the same id some field, getter, setter related to different
Java types
-
annotating more than one field with the same id
-
annotating more than one getter with the same id
-
annotating more than one setter with the same id
-
giving some "required" value on a getter (a getter describes an output data)