Enum ByteBuddyAgent.AgentProvider.ForByteBuddyAgent

    • Field Detail

      • AGENT_FILE_NAME

        private static final java.lang.String AGENT_FILE_NAME
        The default prefix of the Byte Buddy agent jar file.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ForByteBuddyAgent

        private ForByteBuddyAgent()
    • Method Detail

      • values

        public static ByteBuddyAgent.AgentProvider.ForByteBuddyAgent[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ByteBuddyAgent.AgentProvider.ForByteBuddyAgent c : ByteBuddyAgent.AgentProvider.ForByteBuddyAgent.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ByteBuddyAgent.AgentProvider.ForByteBuddyAgent valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • trySelfResolve

        private static java.io.File trySelfResolve()
                                            throws java.io.IOException
        Attempts to resolve the Installer class from this jar file if it can be located. Doing so, it is possible to avoid the creation of a temporary jar file which can remain undeleted on Windows operating systems where the agent is linked by a class loader such that File.deleteOnExit() does not have an effect.
        Returns:
        This jar file's location or null if this jar file's location is inaccessible.
        Throws:
        java.io.IOException - If an I/O exception occurs.
      • createJarFile

        private static java.io.File createJarFile()
                                           throws java.io.IOException
        Creates an agent jar file containing the Installer class.
        Returns:
        The agent jar file.
        Throws:
        java.io.IOException - If an I/O exception occurs.
      • resolve

        public java.io.File resolve()
                             throws java.io.IOException
        Provides an agent jar file for attachment.
        Specified by:
        resolve in interface ByteBuddyAgent.AgentProvider
        Returns:
        The provided agent.
        Throws:
        java.io.IOException - If the agent cannot be written to disk.