1/*2 * $Id: ClassUtil.java 709153 2008-10-30 12:54:10Z apetrelli $3 *4 * Licensed to the Apache Software Foundation (ASF) under one5 * or more contributor license agreements. See the NOTICE file6 * distributed with this work for additional information7 * regarding copyright ownership. The ASF licenses this file8 * to you under the Apache License, Version 2.0 (the9 * "License"); you may not use this file except in compliance10 * with the License. You may obtain a copy of the License at11 *12 * http://www.apache.org/licenses/LICENSE-2.013 *14 * Unless required by applicable law or agreed to in writing,15 * software distributed under the License is distributed on an16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY17 * KIND, either express or implied. See the License for the18 * specific language governing permissions and limitations19 * under the License.20 */21package org.apache.tiles.util;
2223/***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
30publicfinalclassClassUtil {
3132/***33 * Constructor, private to avoid instantiation.34 */35privateClassUtil() {
36 }
3738/***39 * Returns an instance of the given class name, by calling the default40 * 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 If45 * something goes wrong during instantiation.46 * @deprecated Use47 * {@link org.apache.tiles.reflect.ClassUtil#instantiate(String)}.48 */49 @Deprecated
50publicstatic Object instantiate(String className) {
51return org.apache.tiles.reflect.ClassUtil.instantiate(className);
52 }
5354/***55 * Returns an instance of the given class name, by calling the default56 * 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 it60 * returns <code>true</code>, otherwise it throws a61 * <code>TilesException</code>.62 * @return The new instance of the class name.63 * @throws org.apache.tiles.reflect.CannotInstantiateObjectException If64 * something goes wrong during instantiation.65 * @deprecated Use66 * {@link org.apache.tiles.reflect.ClassUtil#instantiate(String, boolean)}.67 */68 @Deprecated
69publicstatic Object instantiate(String className, boolean returnNull) {
70return org.apache.tiles.reflect.ClassUtil.instantiate(className,
71 returnNull);
72 }
73 }