MCPcopy
hub / github.com/Col-E/Recaf / agent

Method agent

src/main/java/me/coley/recaf/Recaf.java:55–74  ·  view source on GitHub ↗
(String args, Instrumentation inst)

Source from the content-addressed store, hash-verified

53 }
54
55 private static void agent(String args, Instrumentation inst) {
56 InstrumentationResource.instrumentation = inst;
57 if (Recaf.class.getClassLoader() == ClassLoader.getSystemClassLoader()) {
58 warn("Recaf was attached and loaded into system class loader," +
59 " that is not a good thing!");
60 }
61
62 init();
63 VMUtil.patchInstrumentation(inst);
64 // Log that we are an agent
65 info("Starting as agent...");
66 // Add instrument launch arg
67 if(args == null || args.trim().isEmpty())
68 args = "--instrument";
69 else if(!args.contains("--instrument"))
70 args = args + ",--instrument";
71 // Set instance
72 // Start Recaf
73 launch(args.split("[=,]"));
74 }
75
76 /**
77 * Run pre-launch initialization tasks.

Callers

nothing calls this directly

Calls 7

initMethod · 0.95
patchInstrumentationMethod · 0.95
launchMethod · 0.95
warnMethod · 0.80
infoMethod · 0.80
isEmptyMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected