MCPcopy Index your code
hub / github.com/apache/tomcat / loadClass

Method loadClass

java/org/apache/catalina/util/Introspection.java:89–102  ·  view source on GitHub ↗

Attempt to load a class using the given Container's class loader. If the class cannot be loaded, a debug level log message will be written to the Container's log and null will be returned. @param context The class loader of this context will be used to attempt to load the class @param className T

(Context context, String className)

Source from the content-addressed store, hash-verified

87 * @return the loaded class or <code>null</code> if loading failed
88 */
89 public static Class<?> loadClass(Context context, String className) {
90 ClassLoader cl = context.getLoader().getClassLoader();
91 Log log = context.getLogger();
92 Class<?> clazz = null;
93 try {
94 clazz = cl.loadClass(className);
95 } catch (ClassNotFoundException | NoClassDefFoundError | ClassFormatError e) {
96 log.debug(sm.getString("introspection.classLoadFailed", className), e);
97 } catch (Throwable t) {
98 ExceptionUtils.handleThrowable(t);
99 log.debug(sm.getString("introspection.classLoadFailed", className), t);
100 }
101 return clazz;
102 }
103
104 /**
105 * Converts the primitive type to its corresponding wrapper.

Callers 12

checkResourceTypeMethod · 0.95
getCompatibleTypeMethod · 0.95
checkHandlesTypesMethod · 0.95
addServletMethod · 0.95
initMethod · 0.45
parseServerXmlMethod · 0.45
mainMethod · 0.45
initMethod · 0.45
resolveProxyClassMethod · 0.45

Calls 6

debugMethod · 0.95
handleThrowableMethod · 0.95
getClassLoaderMethod · 0.65
getLoaderMethod · 0.65
getLoggerMethod · 0.65
getStringMethod · 0.65

Tested by

no test coverage detected