aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/junit/internal/Classes.java
blob: 154603d2e4f607bd08f2d0c64da14026a24f13fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package org.junit.internal;

import static java.lang.Thread.currentThread;

/**
 * Miscellaneous functions dealing with classes.
 */
public class Classes {
    /**
     * Returns Class.forName for {@code className} using the current thread's class loader.
     *
     * @param className Name of the class.
     * @throws ClassNotFoundException
     */
    public static Class<?> getClass(String className) throws ClassNotFoundException {
        return Class.forName(className, true, currentThread().getContextClassLoader());
    }
}