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.
  • Field Details

    • VIRTUAL_MACHINE_TYPE_NAME

      static final String VIRTUAL_MACHINE_TYPE_NAME
      The name of the VirtualMachine class on any OpenJDK or Oracle JDK implementation.
      See Also:
    • VIRTUAL_MACHINE_TYPE_NAME_J9

      static final String VIRTUAL_MACHINE_TYPE_NAME_J9
      The name of the VirtualMachine 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()
      Returns true 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 a VirtualMachine class. This method must only be called for available accessors.
      Returns:
      The virtual machine type.
    • getExternalAttachment

      Returns a description of a virtual machine class for an external attachment.
      Returns:
      A description of the external attachment.