cls.add(c);
}
}
final ClassLoaderTransformer classLoaderTransformer = new ClassLoaderTransformer();
final MainTransformer mainTransformer = new MainTransformer(extension);
Agent.mainTransformer = mainTransformer;
inst.addTransformer(mainTransformer, true);
mainTransformer.addTransformer(classLoaderTransformer);
try {
inst.retransformClasses(cls.toArray(EMPTY_CL_ARRAY));
} catch (UnmodifiableClassException e) {
e.printStackTrace();
}
mainTransformer.addTransformer(new Transformer(extension));
//start the server
Thread thread = new Thread(new FakereplaceServer(Integer.parseInt(AgentOptions.getOption(AgentOption.PORT))));
thread.setDaemon(true);
thread.setName("Fakereplace Thread");