Fix class name in generated meta-data

Previously, the algorithm that computes the String representation of a
class reference and a property type was shared. This lead to generic
information for group's `type` and `sourceType` property.

This commit separates that logic in two: `getQualifiedName` is now
responsible to generate a fully qualified class name while the existing
`getType` is solely responsible to generate a type representation for the
property. Only the latter has generic information.

Closes gh-7236
This commit is contained in:
Stephane Nicoll
2016-10-28 11:47:20 +02:00
parent bd2956c3f0
commit 5863e6f78c
6 changed files with 190 additions and 19 deletions

View File

@@ -164,12 +164,13 @@ The JSON object contained in the `properties` array can contain the following at
|`type`
| String
| The class name of the data type of the property. For example, `java.lang.String`. This
attribute can be used to guide the user as to the types of values that they can enter.
For consistency, the type of a primitive is specified using its wrapper counterpart,
i.e. `boolean` becomes `java.lang.Boolean`. Note that this class may be a complex type
that gets converted from a String as values are bound. May be omitted if the type is
not known.
| The full signature of the data type of the property. For example, `java.lang.String`
but also a full generic type such as `java.util.Map<java.util.String,acme.MyEnum>`.
This attribute can be used to guide the user as to the types of values that they can
enter. For consistency, the type of a primitive is specified using its wrapper
counterpart, i.e. `boolean` becomes `java.lang.Boolean`. Note that this class may be
a complex type that gets converted from a String as values are bound. May be omitted
if the type is not known.
|`description`
| String