Package org.junit.internal
Class Classes
- java.lang.Object
-
- org.junit.internal.Classes
-
public class Classes extends java.lang.Object
Miscellaneous functions dealing with classes.
-
-
Constructor Summary
Constructors Constructor Description Classes()
Deprecated.will be private soon.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Class<?>
getClass(java.lang.String className)
Returns Class.forName forclassName
using the current thread's class loader.static java.lang.Class<?>
getClass(java.lang.String className, java.lang.Class<?> callingClass)
Returns Class.forName forclassName
using the current thread's class loader.
-
-
-
Method Detail
-
getClass
public static java.lang.Class<?> getClass(java.lang.String className) throws java.lang.ClassNotFoundException
Returns Class.forName forclassName
using the current thread's class loader. If the current thread does not have a class loader, falls back to the class loader forClasses
.- Parameters:
className
- Name of the class.- Throws:
java.lang.ClassNotFoundException
-
getClass
public static java.lang.Class<?> getClass(java.lang.String className, java.lang.Class<?> callingClass) throws java.lang.ClassNotFoundException
Returns Class.forName forclassName
using the current thread's class loader. If the current thread does not have a class loader, falls back to the class loader for the passed-in class.- Parameters:
className
- Name of the class.callingClass
- Class that is requesting a the class- Throws:
java.lang.ClassNotFoundException
- Since:
- 4.13
-
-