Package net.bytebuddy.agent
Enum ByteBuddyAgent.AttachmentProvider.ForStandardToolsJarVm
- java.lang.Object
-
- java.lang.Enum<ByteBuddyAgent.AttachmentProvider.ForStandardToolsJarVm>
-
- net.bytebuddy.agent.ByteBuddyAgent.AttachmentProvider.ForStandardToolsJarVm
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ByteBuddyAgent.AttachmentProvider.ForStandardToolsJarVm>
,ByteBuddyAgent.AttachmentProvider
- Enclosing interface:
- ByteBuddyAgent.AttachmentProvider
public static enum ByteBuddyAgent.AttachmentProvider.ForStandardToolsJarVm extends java.lang.Enum<ByteBuddyAgent.AttachmentProvider.ForStandardToolsJarVm> implements ByteBuddyAgent.AttachmentProvider
An attachment provider that is dependant on the existence of a tools.jar file on the local file system.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.agent.ByteBuddyAgent.AttachmentProvider
ByteBuddyAgent.AttachmentProvider.Accessor, ByteBuddyAgent.AttachmentProvider.Compound, ByteBuddyAgent.AttachmentProvider.ForEmulatedAttachment, ByteBuddyAgent.AttachmentProvider.ForJ9Vm, ByteBuddyAgent.AttachmentProvider.ForModularizedVm, ByteBuddyAgent.AttachmentProvider.ForStandardToolsJarVm, ByteBuddyAgent.AttachmentProvider.ForUserDefinedToolsJar
-
-
Enum Constant Summary
Enum Constants Enum Constant Description JDK_ROOT
An attachment provider that locates the tools.jar from a Java installation directory.JVM_ROOT
An attachment provider that locates the tools.jar from a Java home directory.MACINTOSH
An attachment provider that locates the tools.jar as it is set for several JVM installations on Apple Macintosh computers.
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
JAVA_HOME_PROPERTY
The Java home system property.private java.lang.String
toolsJarPath
The path to the tools.jar file, starting from the Java home directory.-
Fields inherited from interface net.bytebuddy.agent.ByteBuddyAgent.AttachmentProvider
DEFAULT
-
-
Constructor Summary
Constructors Modifier Constructor Description private
ForStandardToolsJarVm(java.lang.String toolsJarPath)
Creates a new attachment provider that loads the virtual machine class from the tools.jar.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteBuddyAgent.AttachmentProvider.Accessor
attempt()
Attempts the creation of an accessor for a specific JVM's attachment API.static ByteBuddyAgent.AttachmentProvider.ForStandardToolsJarVm
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ByteBuddyAgent.AttachmentProvider.ForStandardToolsJarVm[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
JVM_ROOT
public static final ByteBuddyAgent.AttachmentProvider.ForStandardToolsJarVm JVM_ROOT
An attachment provider that locates the tools.jar from a Java home directory.
-
JDK_ROOT
public static final ByteBuddyAgent.AttachmentProvider.ForStandardToolsJarVm JDK_ROOT
An attachment provider that locates the tools.jar from a Java installation directory. In practice, several virtual machines do not return the JRE's location for the java.home property against the property's specification.
-
MACINTOSH
public static final ByteBuddyAgent.AttachmentProvider.ForStandardToolsJarVm MACINTOSH
An attachment provider that locates the tools.jar as it is set for several JVM installations on Apple Macintosh computers.
-
-
Field Detail
-
JAVA_HOME_PROPERTY
private static final java.lang.String JAVA_HOME_PROPERTY
The Java home system property.- See Also:
- Constant Field Values
-
toolsJarPath
private final java.lang.String toolsJarPath
The path to the tools.jar file, starting from the Java home directory.
-
-
Method Detail
-
values
public static ByteBuddyAgent.AttachmentProvider.ForStandardToolsJarVm[] 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.AttachmentProvider.ForStandardToolsJarVm c : ByteBuddyAgent.AttachmentProvider.ForStandardToolsJarVm.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.AttachmentProvider.ForStandardToolsJarVm 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 namejava.lang.NullPointerException
- if the argument is null
-
attempt
public ByteBuddyAgent.AttachmentProvider.Accessor attempt()
Attempts the creation of an accessor for a specific JVM's attachment API.- Specified by:
attempt
in interfaceByteBuddyAgent.AttachmentProvider
- Returns:
- The accessor this attachment provider can supply for the currently running JVM.
-
-