public class Installer extends Object
Modifier and Type | Field and Description |
---|---|
static Instrumentation |
instrumentation
A field for carrying the
Instrumentation that was loaded by the Byte Buddy
agent. |
Modifier and Type | Method and Description |
---|---|
static void |
agentmain(String agentArguments,
Instrumentation instrumentation)
Allows the installation of this agent via the Attach API.
|
static void |
premain(String agentArguments,
Instrumentation instrumentation)
Allows the installation of this agent via a command line argument.
|
public static volatile Instrumentation instrumentation
Instrumentation
that was loaded by the Byte Buddy
agent. Note that this field must never be accessed directly as the agent is injected into the VM's
system class loader. This way, the field of this class might be null
even after the installation
of the Byte Buddy agent as this class might be loaded by a different class loader than the system class
loader.public static void premain(String agentArguments, Instrumentation instrumentation)
agentArguments
- The unused agent arguments.instrumentation
- The instrumentation instance.public static void agentmain(String agentArguments, Instrumentation instrumentation)
agentArguments
- The unused agent arguments.instrumentation
- The instrumentation instance.Copyright © 2014–2016. All rights reserved.