MCPcopy Create free account
hub / github.com/cinit/TMoe / load

Method load

app/src/main/java/cc/ioctl/tmoe/util/Initiator.java:39–64  ·  view source on GitHub ↗
(String className)

Source from the content-addressed store, hash-verified

37 }
38
39 @Nullable
40 public static Class<?> load(String className) {
41 if (className == null || className.isEmpty()) {
42 return null;
43 }
44 className = className.replace('/', '.');
45 if (className.endsWith(";")) {
46 if (className.charAt(0) == 'L') {
47 className = className.substring(1, className.length() - 1);
48 } else {
49 className = className.substring(0, className.length() - 1);
50 }
51 }
52 if (className.startsWith(".")) {
53 className = HostInfo.getPackageName() + className;
54 }
55 try {
56 return sHostClassLoader.loadClass(className);
57 } catch (ClassNotFoundException ignored) {
58 }
59 try {
60 return sPluginParentClassLoader.loadClass(className);
61 } catch (ClassNotFoundException ignored) {
62 return null;
63 }
64 }
65}

Callers 15

getThemeClassMethod · 0.95
getUserConfigClassMethod · 0.95
getTlrpcUserClassMethod · 0.95
getTlrpcChatClassMethod · 0.95
initializeMethod · 0.95
updateValueMethod · 0.95
getStringImplMethod · 0.95
formatStringMethod · 0.95
isRTLMethod · 0.95
loadClassMethod · 0.95

Calls 4

getPackageNameMethod · 0.95
lengthMethod · 0.80
isEmptyMethod · 0.45
loadClassMethod · 0.45

Tested by

no test coverage detected