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 classDescribes an external attachment to a Java virtual machine.static classA simple implementation of an accessible accessor.static enumA 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 aVirtualMachineclass.booleanDetermines if this accessor is applicable for the currently running JVM.booleanReturnstrueif this accessor prohibits attachment to the same virtual machine in Java 9 and later.
-
Field Details
-
VIRTUAL_MACHINE_TYPE_NAME
The name of theVirtualMachineclass on any OpenJDK or Oracle JDK implementation.- See Also:
-
VIRTUAL_MACHINE_TYPE_NAME_J9
The name of theVirtualMachineclass on IBM J9 VMs.- See Also:
-
-
Method Details
-
isAvailable
boolean isAvailable()Determines if this accessor is applicable for the currently running JVM.- Returns:
trueif this accessor is available.
-
isExternalAttachmentRequired
boolean isExternalAttachmentRequired()Returnstrueif this accessor prohibits attachment to the same virtual machine in Java 9 and later.- Returns:
trueif this accessor prohibits attachment to the same virtual machine in Java 9 and later.
-
getVirtualMachineType
Class<?> getVirtualMachineType()Returns aVirtualMachineclass. 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.
-