-
Notifications
You must be signed in to change notification settings - Fork 12
AnnotationTypes
These are very boring:
-
string
These appear in annotations as quoted strings -
boolean
(alsobool
) These appear in annotations as unquoted true/false values -
integer
(alsoint
) Unquoted numeric value with no decimal point or E notation -
float
Unquoted numeric value with a decimal point or E notation
The type name for an array uses []
syntax, e.g. an array of strings would be string[]
. The array index is assumed to be an int, unless otherwise specified in the []
e.g. string[string]
for a map of strings to strings. Specifying multi-dimensional arrays is possible by adding additional sets of []
. If you use empty []
it is assumed that you do not care about preserving array indexes, only ordering. If you have numeric keys and those keys are important then you must use [int]
In an annotation an array will appear with comma separated values inside braces e.g. `{"foo", "bar", "baz"}. At present specifying values for the indices is NOT possible, all arrays are assumed to be numerically indexed.
Mixed types within an array are not possible.
Any type name that isn't recognised as an array is assumed to be a class name.
The only objects permitted as values inside annotations are other annotations, see e.g. the arguments to @AnnotationCreator where an array of @Parameter
appears