Package org.exoplatform.commons.utils
Class ClassLoading
java.lang.Object
org.exoplatform.commons.utils.ClassLoading
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Class<?> Loads the class using the ClassLoader corresponding to the caller class first, if class not found we try with Thread's context ClassLoader (TCCL).static Class<?> Loads the class using the ClassLoader corresponding to the caller object first, if class not found we try with Thread's context ClassLoader (TCCL).static Class<?> Loads the class using the ClassLoader corresponding to the caller class first, if class not found we try with Thread's context ClassLoader (TCCL).static Class<?> Loads the class using the ClassLoader corresponding to the caller object first, if class not found we try with Thread's context ClassLoader (TCCL).
-
Constructor Details
-
ClassLoading
public ClassLoading()
-
-
Method Details
-
forName
Loads the class using the ClassLoader corresponding to the caller object first, if class not found we try with Thread's context ClassLoader (TCCL). If the TCCL doesn't exist or the class still cannot be found, we use the System class loader.- Parameters:
type- FQN of class to loadcallerObject- the object from which we want to load the class- Returns:
- Loaded class
- Throws:
ClassNotFoundException
-
forName
Loads the class using the ClassLoader corresponding to the caller class first, if class not found we try with Thread's context ClassLoader (TCCL). If the TCCL doesn't exist or the class still cannot be found, we use the System class loader.- Parameters:
type- FQN of class to loadcallerClass- the class from which we want to load the class- Returns:
- Loaded class
- Throws:
ClassNotFoundException
-
loadClass
Loads the class using the ClassLoader corresponding to the caller object first, if class not found we try with Thread's context ClassLoader (TCCL). If the TCCL doesn't exist or the class still cannot be found, we use the System class loader.- Parameters:
type- FQN of class to loadcallerObject- the object from which we want to load the class- Returns:
- Loaded class
- Throws:
ClassNotFoundException
-
loadClass
Loads the class using the ClassLoader corresponding to the caller class first, if class not found we try with Thread's context ClassLoader (TCCL). If the TCCL doesn't exist or the class still cannot be found, we use the System class loader.- Parameters:
type- FQN of class to loadcallerClass- the class from which we want to load the class- Returns:
- Loaded class
- Throws:
ClassNotFoundException
-