org.apache.myfaces.extensions.validator.util
Class ClassUtils

java.lang.Object
  extended by org.apache.myfaces.extensions.validator.util.ClassUtils

public class ClassUtils
extends Object

Since:
1.x.1

Constructor Summary
ClassUtils()
           
 
Method Summary
static String getJarVersion(Class targetClass)
           
static String getPackageName(Class targetClass)
          Gets the package name.
static Object instantiateClassForName(String className)
           
static Class loadClassForName(String name)
           
static
<T> T
tryToInstantiateClass(Class<T> targetClass)
           
static Object tryToInstantiateClassForName(String className)
           
static Class tryToLoadClassForName(String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassUtils

public ClassUtils()
Method Detail

tryToLoadClassForName

public static Class tryToLoadClassForName(String name)

loadClassForName

public static Class loadClassForName(String name)
                              throws ClassNotFoundException
Throws:
ClassNotFoundException

tryToInstantiateClass

public static <T> T tryToInstantiateClass(Class<T> targetClass)

tryToInstantiateClassForName

public static Object tryToInstantiateClassForName(String className)

instantiateClassForName

public static Object instantiateClassForName(String className)
                                      throws ClassNotFoundException,
                                             IllegalAccessException,
                                             InstantiationException
Throws:
ClassNotFoundException
IllegalAccessException
InstantiationException

getJarVersion

public static String getJarVersion(Class targetClass)

getPackageName

public static String getPackageName(Class targetClass)
Gets the package name. Needed for ClassLoaderTestSuite

Parameters:
targetClass - the the class
Returns:
the package name


Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.