This project has retired. For details please refer to its Attic page.
ClassLoadingUtils (Apache Gora 0.2 API)

org.apache.gora.util
Class ClassLoadingUtils

java.lang.Object
  extended by org.apache.gora.util.ClassLoadingUtils

public class ClassLoadingUtils
extends Object


Method Summary
static Class<?> loadClass(Class<?> contextClass, String className)
          Loads a class using the class loader.
static Class<?> loadClass(String className)
          Loads a class using the class loader.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

loadClass

public static Class<?> loadClass(String className)
                          throws ClassNotFoundException
Loads a class using the class loader. 1. The class loader of the current class is being used. 2. The thread context class loader is being used. If both approaches fail, returns null.

Parameters:
className - The name of the class to load.
Returns:
The class or null if no class loader could load the class.
Throws:
ClassNotFoundException

loadClass

public static Class<?> loadClass(Class<?> contextClass,
                                 String className)
                          throws ClassNotFoundException
Loads a class using the class loader. 1. The class loader of the context class is being used. 2. The thread context class loader is being used. If both approaches fail, returns null.

Parameters:
contextClass - The name of a context class to use.
className - The name of the class to load
Returns:
The class or null if no class loader could load the class.
Throws:
ClassNotFoundException


Copyright © 2010-2013 The Apache Software Foundation. All Rights Reserved.