public static class ByteBuddyAgent.AttachmentProvider.Accessor.Simple extends Object implements ByteBuddyAgent.AttachmentProvider.Accessor
ByteBuddyAgent.AttachmentProvider.Accessor.Simple, ByteBuddyAgent.AttachmentProvider.Accessor.Unavailable
VIRTUAL_MACHINE_TYPE_NAME
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. |
String |
toString() |
public static ByteBuddyAgent.AttachmentProvider.Accessor of(ClassLoader classLoader)
com.sun.tools.attach.VirtualMachine
class from the provided class loader.classLoader
- A class loader that is capable of loading the virtual machine type.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.