40
40
* anywhere where class serializer is needed); or only used for
41
41
* serializing property access via a getter method.
42
42
*/
43
- public Class <? extends JsonSerializer <?>> using () default JsonSerializer .None .class ;
43
+ @ SuppressWarnings ("rawtypes" ) // to work around JDK8 bug wrt Class-valued annotation properties
44
+ public Class <? extends JsonSerializer > using () default JsonSerializer .None .class ;
44
45
45
46
/**
46
47
* Serializer class to use for serializing contents (elements
47
48
* of a Collection/array, values of Maps) of annotated property.
48
49
* Can only be used on properties (methods, fields, constructors),
49
50
* and not value classes themselves (as they are typically generic)
50
51
*/
51
- public Class <? extends JsonSerializer <?>> contentUsing ()
52
+ @ SuppressWarnings ("rawtypes" ) // to work around JDK8 bug wrt Class-valued annotation properties
53
+ public Class <? extends JsonSerializer > contentUsing ()
52
54
default JsonSerializer .None .class ;
53
55
54
56
/**
@@ -57,7 +59,8 @@ public Class<? extends JsonSerializer<?>> contentUsing()
57
59
* Can only be used on properties (methods, fields, constructors),
58
60
* and not value classes themselves.
59
61
*/
60
- public Class <? extends JsonSerializer <?>> keyUsing ()
62
+ @ SuppressWarnings ("rawtypes" ) // to work around JDK8 bug wrt Class-valued annotation properties
63
+ public Class <? extends JsonSerializer > keyUsing ()
61
64
default JsonSerializer .None .class ;
62
65
63
66
/**
@@ -69,7 +72,8 @@ public Class<? extends JsonSerializer<?>> keyUsing()
69
72
*
70
73
* @since 2.3
71
74
*/
72
- public Class <? extends JsonSerializer <?>> nullsUsing ()
75
+ @ SuppressWarnings ("rawtypes" ) // to work around JDK8 bug wrt Class-valued annotation properties
76
+ public Class <? extends JsonSerializer > nullsUsing ()
73
77
default JsonSerializer .None .class ;
74
78
75
79
// // // Annotations for type handling, explicit declaration
@@ -130,7 +134,8 @@ public Class<? extends JsonSerializer<?>> nullsUsing()
130
134
*
131
135
* @since 2.2
132
136
*/
133
- public Class <? extends Converter <?,?>> converter () default Converter .None .class ;
137
+ @ SuppressWarnings ("rawtypes" ) // to work around JDK8 bug wrt Class-valued annotation properties
138
+ public Class <? extends Converter > converter () default Converter .None .class ;
134
139
135
140
/**
136
141
* Similar to {@link #converter}, but used for values of structures types
@@ -142,7 +147,8 @@ public Class<? extends JsonSerializer<?>> nullsUsing()
142
147
*
143
148
* @since 2.2
144
149
*/
145
- public Class <? extends Converter <?,?>> contentConverter () default Converter .None .class ;
150
+ @ SuppressWarnings ("rawtypes" ) // to work around JDK8 bug wrt Class-valued annotation properties
151
+ public Class <? extends Converter > contentConverter () default Converter .None .class ;
146
152
147
153
// // // Annotation(s) for inclusion criteria
148
154
@@ -176,6 +182,7 @@ public Class<? extends JsonSerializer<?>> nullsUsing()
176
182
* to define which properties
177
183
* of Java Beans are to be included in serialization
178
184
*/
185
+ @ Deprecated // since 2.0, marked deprecated in 2.6
179
186
public enum Inclusion
180
187
{
181
188
/**
0 commit comments