MCPcopy Create free account
hub / github.com/GraxCode/zelixkiller / load

Method load

src/me/lpk/analysis/Sandbox.java:346–350  ·  view source on GitHub ↗

Load a class by it's node. @param cn ClassNode to load. The static block is stripped so accidental invocation won't occur. @return

(ClassNode cn)

Source from the content-addressed store, hash-verified

344 * @return
345 */
346 public static Class<?> load(ClassNode cn) {
347 ClassWriter cw = new ClassWriter(0);
348 cn.accept(new VisitorImpl(cw));
349 return new ClassDefiner(ClassLoader.getSystemClassLoader()).get(cn.name.replace("/", "."), cw.toByteArray());
350 }
351
352 /**
353 * Classloader that loads a class from bytes.

Callers 5

createProxyMethod · 0.95
getProxyReturnMethod · 0.95
getMethod · 0.95

Calls 2

replaceMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected