@@ -144,7 +144,7 @@ public void setMode(int mode) {
144
144
* @see Converter
145
145
* @see SingleValueConverter
146
146
*/
147
- public void setConverters (ConverterMatcher [] converters ) {
147
+ public void setConverters (ConverterMatcher ... converters ) {
148
148
for (int i = 0 ; i < converters .length ; i ++) {
149
149
if (converters [i ] instanceof Converter ) {
150
150
getXStream ().registerConverter ((Converter ) converters [i ], i );
@@ -159,8 +159,8 @@ else if (converters[i] instanceof SingleValueConverter) {
159
159
}
160
160
161
161
/**
162
- * Sets an alias/type map, consisting of string aliases mapped to classes. Keys are aliases; values are either
163
- * {@code Class} instances, or String class names.
162
+ * Set an alias/type map, consisting of String aliases mapped to classes.
163
+ * <p>Keys are aliases; values are either Class objects or String class names.
164
164
* @see XStream#alias(String, Class)
165
165
*/
166
166
public void setAliases (Map <String , ?> aliases ) throws ClassNotFoundException {
@@ -171,9 +171,9 @@ public void setAliases(Map<String, ?> aliases) throws ClassNotFoundException {
171
171
}
172
172
173
173
/**
174
- * Sets the aliases by type map, consisting of string aliases mapped to classes. Any class that is assignable to
175
- * this type will be aliased to the same name. Keys are aliases; values are either
176
- * {@code Class} instances, or String class names.
174
+ * Set the aliases by type map, consisting of String aliases mapped to classes.
175
+ * <p>Any class that is assignable to this type will be aliased to the same name.
176
+ * Keys are aliases; values are either Class objects or String class names.
177
177
* @see XStream#aliasType(String, Class)
178
178
*/
179
179
public void setAliasesByType (Map <String , ?> aliases ) throws ClassNotFoundException {
@@ -205,7 +205,7 @@ else if (value instanceof String) {
205
205
}
206
206
207
207
/**
208
- * Set a field alias/type map, consiting of field names.
208
+ * Set a field alias/type map, consisting of field names.
209
209
* @see XStream#aliasField(String, Class, String)
210
210
*/
211
211
public void setFieldAliases (Map <String , String > aliases ) throws ClassNotFoundException , NoSuchFieldException {
@@ -229,7 +229,7 @@ public void setFieldAliases(Map<String, String> aliases) throws ClassNotFoundExc
229
229
* Set types to use XML attributes for.
230
230
* @see XStream#useAttributeFor(Class)
231
231
*/
232
- public void setUseAttributeForTypes (Class <?>[] types ) {
232
+ public void setUseAttributeForTypes (Class <?>... types ) {
233
233
for (Class <?> type : types ) {
234
234
getXStream ().useAttributeFor (type );
235
235
}
@@ -282,7 +282,7 @@ else if (entry.getValue() instanceof List) {
282
282
/**
283
283
* Specify implicit collection fields, as a Map consisting of {@code Class} instances
284
284
* mapped to comma separated collection field names.
285
- *@see XStream#addImplicitCollection(Class, String)
285
+ * @see XStream#addImplicitCollection(Class, String)
286
286
*/
287
287
public void setImplicitCollections (Map <Class <?>, String > implicitCollections ) {
288
288
for (Map .Entry <Class <?>, String > entry : implicitCollections .entrySet ()) {
@@ -308,19 +308,21 @@ public void setOmittedFields(Map<Class<?>, String> omittedFields) {
308
308
}
309
309
310
310
/**
311
- * Set the classes for which mappings will be read from class-level JDK 1.5+ annotation metadata.
311
+ * Set the classes for which mappings will be read from class-level annotation metadata.
312
312
* @see XStream#processAnnotations(Class)
313
+ * @deprecated in favor of {@link #setAnnotatedClasses} with varargs
313
314
*/
315
+ @ Deprecated
314
316
public void setAnnotatedClass (Class <?> annotatedClass ) {
315
317
Assert .notNull (annotatedClass , "'annotatedClass' must not be null" );
316
318
getXStream ().processAnnotations (annotatedClass );
317
319
}
318
320
319
321
/**
320
- * Set annotated classes for which aliases will be read from class-level JDK 1.5+ annotation metadata.
322
+ * Set annotated classes for which aliases will be read from class-level annotation metadata.
321
323
* @see XStream#processAnnotations(Class[])
322
324
*/
323
- public void setAnnotatedClasses (Class <?>[] annotatedClasses ) {
325
+ public void setAnnotatedClasses (Class <?>... annotatedClasses ) {
324
326
Assert .notEmpty (annotatedClasses , "'annotatedClasses' must not be empty" );
325
327
getXStream ().processAnnotations (annotatedClasses );
326
328
}
@@ -355,7 +357,7 @@ public void setEncoding(String encoding) {
355
357
* <p>If this property is empty (the default), all classes are supported.
356
358
* @see #supports(Class)
357
359
*/
358
- public void setSupportedClasses (Class <?>[] supportedClasses ) {
360
+ public void setSupportedClasses (Class <?>... supportedClasses ) {
359
361
this .supportedClasses = supportedClasses ;
360
362
}
361
363
0 commit comments