ttomcat-1778514358873.zip-extract/_dependencies/maven/junit_junit-4.13.2/org/junit/internal/Classes.java

Path
ttomcat-1778514358873.zip-extract/_dependencies/maven/junit_junit-4.13.2/org/junit/internal/Classes.java
Status
scanned
Type
file
Name
Classes.java
Extension
.java
Programming language
Java
Mime type
text/plain
File type
ASCII text, with CRLF line terminators
Tag

      
    
Rootfs path

      
    
Size
1496 (1.5 KB)
MD5
347205612b8f88d587f38bdb4b295d14
SHA1
e6d294a91592e476116856c99bc29a128068621a
SHA256
d14d09d64538997e3155bb1264241f1e086728a8f51f4e25e9ed82ea47c0bbd5
SHA512

      
    
SHA1_git
e8404f685504047b80c767107cecdde4c81f45eb
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
Classes.java | 1.5 KB |

package org.junit.internal; import static java.lang.Thread.currentThread; /** * Miscellaneous functions dealing with classes. */ public class Classes { /** * Do not instantiate. * @deprecated will be private soon. */ @Deprecated public Classes() { } /** * Returns Class.forName for {@code className} using the current thread's class loader. * If the current thread does not have a class loader, falls back to the class loader for * {@link Classes}. * * @param className Name of the class. * @throws ClassNotFoundException */ public static Class<?> getClass(String className) throws ClassNotFoundException { return getClass(className, Classes.class); } /** * Returns Class.forName for {@code className} 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. * * @param className Name of the class. * @param callingClass Class that is requesting a the class * @throws ClassNotFoundException * @since 4.13 */ public static Class<?> getClass(String className, Class<?> callingClass) throws ClassNotFoundException { ClassLoader classLoader = currentThread().getContextClassLoader(); return Class.forName(className, true, classLoader == null ? callingClass.getClassLoader() : classLoader); } }