We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
public static void premain(String args, Instrumentation inst) { System.out.println("=========premain method run========"); AgentBuilder.Default.of(ClassFileVersion.JAVA_V8) .type(ElementMatchers.named("sun.management.VMManagementImpl")) .transform((builder, typeDescription, classLoader, module, protectionDomain) -> builder .visit(Advice.to(VMManagementImplAdvice.class) .on(ElementMatchers.named("getVmArguments")))) .installOn(inst); premain(args, inst, false); } @Advice.OnMethodExit public static void intercept(@Advice.Return List<String> vmArgs) { vmArgs.add("something"); }
The sun.management.VMManagementImpl replacement for their implementation of the inner classes org.test.Sample , it's work !!!
class Sample { public List<String> getVmArguments(List<String> vmArgs){ return vmArgs; } }
The text was updated successfully, but these errors were encountered:
Unfortunately, I cannot follow. Do you have a question?
Sorry, something went wrong.
raphw
No branches or pull requests
The sun.management.VMManagementImpl replacement for their implementation of the inner classes org.test.Sample , it's work !!!
The text was updated successfully, but these errors were encountered: