In annotations one may want to have something to the right of the colon:
(myAnnotation): something
The way to specify the format of that "something" is through a parameters property in the annotation type declaration. According to the spec, that property takes a map of parameter names to types, so e.g.
(myAnnotation):
p1: my value of p1
p2: my value of p2
But then the "something" could never be a basic type. The examples and the current parser implementation seem to imply that there is a hack for this: to use the parameter name value. So
This is IMHO a bad design, that could be fixed by replacing the parameters property with a value property. This property would expect a type reference or inline type as value so that the examples above would look like this:
In annotations one may want to have something to the right of the colon:
The way to specify the format of that "something" is through a
parameters
property in the annotation type declaration. According to the spec, that property takes a map of parameter names to types, so e.g.then allows annotations of the following format:
But then the "something" could never be a basic type. The examples and the current parser implementation seem to imply that there is a hack for this: to use the parameter name
value
. Soallows the following annotation:
This is IMHO a bad design, that could be fixed by replacing the
parameters
property with avalue
property. This property would expect a type reference or inline type as value so that the examples above would look like this: