Class ByteBuddyAgent.AttachmentProvider.Accessor.Simple

    • Field Detail

      • virtualMachineType

        protected final java.lang.Class<?> virtualMachineType
        A VirtualMachine class.
    • Constructor Detail

      • Simple

        protected Simple​(java.lang.Class<?> virtualMachineType)
        Creates a new simple accessor.
        Parameters:
        virtualMachineType - A VirtualMachine class.
    • Method Detail

      • of

        public static ByteBuddyAgent.AttachmentProvider.Accessor of​(java.lang.ClassLoader classLoader,
                                                                    java.io.File... classPath)

        Creates an accessor by reading the process id from the JMX runtime bean and by attempting to load the com.sun.tools.attach.VirtualMachine class from the provided class loader.

        This accessor is supposed to work on any implementation of the OpenJDK or Oracle JDK.

        Parameters:
        classLoader - A class loader that is capable of loading the virtual machine type.
        classPath - The class path required to load the virtual machine class.
        Returns:
        An appropriate accessor.
      • ofJ9

        public static ByteBuddyAgent.AttachmentProvider.Accessor ofJ9()

        Creates an accessor by reading the process id from the JMX runtime bean and by attempting to load the com.ibm.tools.attach.VirtualMachine class from the provided class loader.

        This accessor is supposed to work on any implementation of IBM's J9.

        Returns:
        An appropriate accessor.