io.quarkus.changeagent.ClassChangeAgent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-class-change-agent Show documentation
Show all versions of quarkus-class-change-agent Show documentation
A Java Agent that exposes the instrumentation API. This allows for super fast
hot reloads if there have been no changes to the structure of the class files.
This agent is not required for hot reload, it just provides an optimisation in
some circumstances.
package io.quarkus.changeagent;
import java.lang.instrument.Instrumentation;
public class ClassChangeAgent {
private static volatile Instrumentation instrumentation;
public static Instrumentation getInstrumentation() {
return instrumentation;
}
public static void premain(java.lang.String s, Instrumentation i) {
instrumentation = i;
}
}