1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.apache.tiles.util;
22
23 /***
24 * Utilities to work with dynamic class loading and instantiation.
25 *
26 * @version $Rev: 709153 $ $Date: 2008-10-30 13:54:10 +0100 (gio, 30 ott 2008) $
27 * @deprecated Use {@link org.apache.tiles.reflect.ClassUtil}.
28 */
29 @Deprecated
30 public final class ClassUtil {
31
32 /***
33 * Constructor, private to avoid instantiation.
34 */
35 private ClassUtil() {
36 }
37
38 /***
39 * Returns an instance of the given class name, by calling the default
40 * constructor.
41 *
42 * @param className The class name to load and to instantiate.
43 * @return The new instance of the class name.
44 * @throws org.apache.tiles.reflect.CannotInstantiateObjectException If
45 * something goes wrong during instantiation.
46 * @deprecated Use
47 * {@link org.apache.tiles.reflect.ClassUtil#instantiate(String)}.
48 */
49 @Deprecated
50 public static Object instantiate(String className) {
51 return org.apache.tiles.reflect.ClassUtil.instantiate(className);
52 }
53
54 /***
55 * Returns an instance of the given class name, by calling the default
56 * constructor.
57 *
58 * @param className The class name to load and to instantiate.
59 * @param returnNull If <code>true</code>, if the class is not found it
60 * returns <code>true</code>, otherwise it throws a
61 * <code>TilesException</code>.
62 * @return The new instance of the class name.
63 * @throws org.apache.tiles.reflect.CannotInstantiateObjectException If
64 * something goes wrong during instantiation.
65 * @deprecated Use
66 * {@link org.apache.tiles.reflect.ClassUtil#instantiate(String, boolean)}.
67 */
68 @Deprecated
69 public static Object instantiate(String className, boolean returnNull) {
70 return org.apache.tiles.reflect.ClassUtil.instantiate(className,
71 returnNull);
72 }
73 }