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 import org.apache.tiles.TilesException;
24
25
26 /***
27 * Utilities to work with dynamic class loading and instantiation.
28 *
29 * @version $Rev: 708904 $ $Date: 2008-10-29 14:37:02 +0100 (Wed, 29 Oct 2008) $
30 * @deprecated Use {@link org.apache.tiles.reflect.ClassUtil}.
31 */
32 @Deprecated
33 public final class ClassUtil {
34
35 /***
36 * Constructor, private to avoid instantiation.
37 */
38 private ClassUtil() {
39 }
40
41 /***
42 * Returns an instance of the given class name, by calling the default
43 * constructor.
44 *
45 * @param className The class name to load and to instantiate.
46 * @return The new instance of the class name.
47 * @throws TilesException If something goes wrong during instantiation.
48 * @deprecated Use
49 * {@link org.apache.tiles.reflect.ClassUtil#instantiate(String)}.
50 */
51 @Deprecated
52 public static Object instantiate(String className) throws TilesException {
53 return org.apache.tiles.reflect.ClassUtil.instantiate(className);
54 }
55
56 /***
57 * Returns an instance of the given class name, by calling the default
58 * constructor.
59 *
60 * @param className The class name to load and to instantiate.
61 * @param returnNull If <code>true</code>, if the class is not found it
62 * returns <code>true</code>, otherwise it throws a
63 * <code>TilesException</code>.
64 * @return The new instance of the class name.
65 * @throws TilesException If something goes wrong during instantiation.
66 * @deprecated Use
67 * {@link org.apache.tiles.reflect.ClassUtil#instantiate(String, boolean)}.
68 */
69 @Deprecated
70 public static Object instantiate(String className, boolean returnNull)
71 throws TilesException {
72 return org.apache.tiles.reflect.ClassUtil.instantiate(className,
73 returnNull);
74 }
75
76 }