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 Classes Modifier and Type Interface Description static class
ByteBuddyAgent.AttachmentProvider.Accessor.ExternalAttachment
Describes an external attachment to a Java virtual machine.static class
ByteBuddyAgent.AttachmentProvider.Accessor.Simple
A simple implementation of an accessible accessor.static class
ByteBuddyAgent.AttachmentProvider.Accessor.Unavailable
A canonical implementation of an unavailable accessor.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
VIRTUAL_MACHINE_TYPE_NAME
The name of theVirtualMachine
class on any OpenJDK or Oracle JDK implementation.static java.lang.String
VIRTUAL_MACHINE_TYPE_NAME_J9
The name of theVirtualMachine
class on IBM J9 VMs.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ByteBuddyAgent.AttachmentProvider.Accessor.ExternalAttachment
getExternalAttachment()
Returns a description of a virtual machine class for an external attachment.java.lang.Class<?>
getVirtualMachineType()
Returns aVirtualMachine
class.boolean
isAvailable()
Determines if this accessor is applicable for the currently running JVM.boolean
isExternalAttachmentRequired()
Returnstrue
if 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 theVirtualMachine
class 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 theVirtualMachine
class 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:
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
java.lang.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.
-
-