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.AccessorAn accessor for a JVM's attachment API.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classByteBuddyAgent.AttachmentProvider.Accessor.ExternalAttachmentDescribes an external attachment to a Java virtual machine.static classByteBuddyAgent.AttachmentProvider.Accessor.SimpleA simple implementation of an accessible accessor.static classByteBuddyAgent.AttachmentProvider.Accessor.UnavailableA canonical implementation of an unavailable accessor.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringVIRTUAL_MACHINE_TYPE_NAMEThe name of theVirtualMachineclass on any OpenJDK or Oracle JDK implementation.static java.lang.StringVIRTUAL_MACHINE_TYPE_NAME_J9The name of theVirtualMachineclass on IBM J9 VMs.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ByteBuddyAgent.AttachmentProvider.Accessor.ExternalAttachmentgetExternalAttachment()Returns a description of a virtual machine class for an external attachment.java.lang.Class<?>getVirtualMachineType()Returns aVirtualMachineclass.booleanisAvailable()Determines if this accessor is applicable for the currently running JVM.booleanisExternalAttachmentRequired()Returnstrueif this accessor prohibits attachment to the same virtual machine in Java 9 and later.
-
-
-
Field Detail
-
VIRTUAL_MACHINE_TYPE_NAME
static final java.lang.String VIRTUAL_MACHINE_TYPE_NAME
The name of theVirtualMachineclass on any OpenJDK or Oracle JDK implementation.- See Also:
- Constant Field Values
-
VIRTUAL_MACHINE_TYPE_NAME_J9
static final java.lang.String VIRTUAL_MACHINE_TYPE_NAME_J9
The name of theVirtualMachineclass on IBM J9 VMs.- See Also:
- Constant Field Values
-
-
Method Detail
-
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
java.lang.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.
-
-