01: /*
02: * Copyright (C) 2005 Joe Walnes.
03: * Copyright (C) 2006, 2007, 2008 XStream Committers.
04: * All rights reserved.
05: *
06: * The software in this package is published under the terms of the BSD
07: * style license a copy of which has been included with this distribution in
08: * the LICENSE.txt file.
09: *
10: * Created on 11. August 2005 by Mauro Talevi
11: */
12: package com.thoughtworks.xstream.annotations;
13:
14: import com.thoughtworks.xstream.XStream;
15:
16: /**
17: * Contains utility methods that enable to configure an XStream instance with class and field
18: * aliases, based on a class decorated with annotations defined in this package.
19: *
20: * @author Emil Kirschner
21: * @author Chung-Onn Cheong
22: * @author Guilherme Silveira
23: * @author Jörg Schaible
24: * @deprecated since 1.3, use {@link XStream#processAnnotations(Class[])}
25: */
26: @Deprecated
27: public class Annotations {
28: /**
29: * This class is not instantiable
30: */
31: private Annotations() {
32: }
33:
34: /**
35: * Configures aliases on the specified XStream object based on annotations that decorate the
36: * specified class. It will recursively invoke itself. If a field is parameterized, a
37: * recursive call for each of its parameters type will be made.
38: *
39: * @param topLevelClasses the class for which the XStream object is configured. This class
40: * is expected to be decorated with annotations defined in this package.
41: * @param xstream the XStream object that will be configured
42: * @deprecated since 1.3, use {@link XStream#processAnnotations(Class[])}
43: */
44: @Deprecated
45: public static synchronized void configureAliases(XStream xstream,
46: Class<?>... topLevelClasses) {
47: xstream.processAnnotations(topLevelClasses);
48: }
49: }
|