public static enum ByteBuddyAgent.AgentProvider.ForByteBuddyAgent extends java.lang.Enum<ByteBuddyAgent.AgentProvider.ForByteBuddyAgent> implements ByteBuddyAgent.AgentProvider
ByteBuddyAgent.AgentProvider.ForByteBuddyAgent, ByteBuddyAgent.AgentProvider.ForExistingAgent| Enum Constant and Description |
|---|
INSTANCE
The singleton instance.
|
| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String |
AGENT_FILE_NAME
The default prefix of the Byte Buddy agent jar file.
|
| Modifier and Type | Method and Description |
|---|---|
private static java.io.File |
createJarFile()
Creates an agent jar file containing the
Installer class. |
java.io.File |
resolve()
Provides an agent jar file for attachment.
|
private static java.io.File |
trySelfResolve()
Attempts to resolve the
Installer class from this jar file if it can be located. |
static ByteBuddyAgent.AgentProvider.ForByteBuddyAgent |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ByteBuddyAgent.AgentProvider.ForByteBuddyAgent[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ByteBuddyAgent.AgentProvider.ForByteBuddyAgent INSTANCE
private static final java.lang.String AGENT_FILE_NAME
public static ByteBuddyAgent.AgentProvider.ForByteBuddyAgent[] values()
for (ByteBuddyAgent.AgentProvider.ForByteBuddyAgent c : ByteBuddyAgent.AgentProvider.ForByteBuddyAgent.values()) System.out.println(c);
public static ByteBuddyAgent.AgentProvider.ForByteBuddyAgent valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullprivate static java.io.File trySelfResolve()
throws java.io.IOException
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.null if this jar file's location is inaccessible.java.io.IOException - If an I/O exception occurs.private static java.io.File createJarFile()
throws java.io.IOException
Installer class.java.io.IOException - If an I/O exception occurs.public java.io.File resolve()
throws java.io.IOException
resolve in interface ByteBuddyAgent.AgentProviderjava.io.IOException - If the agent cannot be written to disk.