Package net.bytebuddy.agent
Interface ByteBuddyAgent.AttachmentProvider.Accessor
- All Known Implementing Classes:
ByteBuddyAgent.AttachmentProvider.Accessor.Simple
,ByteBuddyAgent.AttachmentProvider.Accessor.Simple.WithDirectAttachment
,ByteBuddyAgent.AttachmentProvider.Accessor.Simple.WithExternalAttachment
,ByteBuddyAgent.AttachmentProvider.Accessor.Unavailable
- Enclosing interface:
- ByteBuddyAgent.AttachmentProvider
public static interface ByteBuddyAgent.AttachmentProvider.Accessor
An accessor for a JVM's attachment API.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
Describes an external attachment to a Java virtual machine.static class
A simple implementation of an accessible accessor.static enum
A canonical implementation of an unavailable accessor. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionReturns a description of a virtual machine class for an external attachment.Class<?>
Returns aVirtualMachine
class.boolean
Determines if this accessor is applicable for the currently running JVM.boolean
Returnstrue
if this accessor prohibits attachment to the same virtual machine in Java 9 and later.
-
Field Details
-
VIRTUAL_MACHINE_TYPE_NAME
The name of theVirtualMachine
class on any OpenJDK or Oracle JDK implementation.- See Also:
-
VIRTUAL_MACHINE_TYPE_NAME_J9
The name of theVirtualMachine
class on IBM J9 VMs.- See Also:
-
-
Method Details
-
isAvailable
boolean isAvailable()Determines if this accessor is applicable for the currently running JVM.- Returns:
true
if this accessor is available.
-
isExternalAttachmentRequired
boolean isExternalAttachmentRequired()Returnstrue
if this accessor prohibits attachment to the same virtual machine in Java 9 and later.- Returns:
true
if this accessor prohibits attachment to the same virtual machine in Java 9 and later.
-
getVirtualMachineType
Class<?> getVirtualMachineType()Returns aVirtualMachine
class. This method must only be called for available accessors.- Returns:
- The virtual machine type.
-
getExternalAttachment
ByteBuddyAgent.AttachmentProvider.Accessor.ExternalAttachment getExternalAttachment()Returns a description of a virtual machine class for an external attachment.- Returns:
- A description of the external attachment.
-