public static class ByteBuddyAgent.AttachmentProvider.Accessor.Simple extends Object implements ByteBuddyAgent.AttachmentProvider.Accessor
Modifier and Type | Class and Description |
---|---|
protected static interface |
ByteBuddyAgent.AttachmentProvider.Accessor.Simple.Dispatcher
A dispatcher for reading a process id of the current process.
|
ByteBuddyAgent.AttachmentProvider.Accessor.Simple, ByteBuddyAgent.AttachmentProvider.Accessor.Unavailable
VIRTUAL_MACHINE_TYPE_NAME, VIRTUAL_MACHINE_TYPE_NAME_J9
Modifier | Constructor and Description |
---|---|
protected |
Simple(Class<?> virtualMachineType,
String processId)
Creates a new simple accessor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
String |
getProcessId()
Returns the current JVM instance's process id.
|
Class<?> |
getVirtualMachineType()
Returns the
com.sun.tools.attach.VirtualMachine class. |
int |
hashCode() |
boolean |
isAvailable()
Determines if this accessor is applicable for the currently running JVM.
|
protected static ByteBuddyAgent.AttachmentProvider.Accessor |
of(Class<?> virtualMachineType)
Creates an accessor by reading the process id from the JMX runtime bean.
|
static ByteBuddyAgent.AttachmentProvider.Accessor |
of(ClassLoader classLoader)
Creates an accessor by reading the process id from the JMX runtime bean and by attempting
to load the
com.sun.tools.attach.VirtualMachine class from the provided class loader. |
static ByteBuddyAgent.AttachmentProvider.Accessor |
ofJ9()
Creates an accessor by reading the process id from the JMX runtime bean and by attempting
to load the
com.ibm.tools.attach.VirtualMachine class from the provided class loader. |
String |
toString() |
public static ByteBuddyAgent.AttachmentProvider.Accessor of(ClassLoader classLoader)
Creates an accessor by reading the process id from the JMX runtime bean and by attempting
to load the com.sun.tools.attach.VirtualMachine
class from the provided class loader.
This accessor is supposed to work on any implementation of the OpenJDK or Oracle JDK.
classLoader
- A class loader that is capable of loading the virtual machine type.public static ByteBuddyAgent.AttachmentProvider.Accessor ofJ9()
Creates an accessor by reading the process id from the JMX runtime bean and by attempting
to load the com.ibm.tools.attach.VirtualMachine
class from the provided class loader.
This accessor is supposed to work on any implementation of IBM's J9.
protected static ByteBuddyAgent.AttachmentProvider.Accessor of(Class<?> virtualMachineType)
virtualMachineType
- The virtual machine type.public boolean isAvailable()
ByteBuddyAgent.AttachmentProvider.Accessor
isAvailable
in interface ByteBuddyAgent.AttachmentProvider.Accessor
true
if this accessor is available.public Class<?> getVirtualMachineType()
ByteBuddyAgent.AttachmentProvider.Accessor
com.sun.tools.attach.VirtualMachine
class. This method must only be called
for available accessors.getVirtualMachineType
in interface ByteBuddyAgent.AttachmentProvider.Accessor
public String getProcessId()
ByteBuddyAgent.AttachmentProvider.Accessor
getProcessId
in interface ByteBuddyAgent.AttachmentProvider.Accessor
Copyright © 2014–2016. All rights reserved.