An implementation for attachment on a virtual machine. This interface mimics the tooling API's virtual
machine interface to allow for similar usage by ByteBuddyAgent where all calls are made via
reflection such that this structural typing suffices for interoperability.
Note
Implementations are required to declare a static method attach(String) returning an
instance of a class that declares the methods defined by VirtualMachine.
| Modifier and Type | Class and Description |
|---|---|
| public abstract static class | VirtualMachine.AbstractBase
An abstract base implementation for a virtual machine. |
| public static class | VirtualMachine.ForHotSpot
A virtual machine attachment implementation for a HotSpot VM or any compatible JVM. |
| public static class | VirtualMachine.ForOpenJ9
A virtual machine attachment implementation for OpenJ9 or any compatible JVM. |
| public static enum | VirtualMachine.Resolver
A resolver for the current VM's virtual machine attachment emulation. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public Properties | |
| public Properties | |
| public void | |
| public void | |
| public void | loadAgentLibrary(String
The agent library. library)Loads a native agent library into the represented virtual machine. |
| public void | loadAgentLibrary(String
The agent library. library, String The argument to provide or argument)null if no argument should be provided.Loads a native agent library into the represented virtual machine. |
| public void | |
| public void | loadAgentPath(String
The agent path. path, String The argument to provide or argument)null if no argument should be provided.Loads a native agent into the represented virtual machine. |
| public String | |
| public void | startManagementAgent(Properties
The properties to transfer to the JMX agent. properties)Starts a JMX management agent. |