Package net.bytebuddy.agent
Enum Class ByteBuddyAgent.AttachmentProvider.ForStandardToolsJarVm
java.lang.Object
java.lang.Enum<ByteBuddyAgent.AttachmentProvider.ForStandardToolsJarVm>
net.bytebuddy.agent.ByteBuddyAgent.AttachmentProvider.ForStandardToolsJarVm
- All Implemented Interfaces:
Serializable
,Comparable<ByteBuddyAgent.AttachmentProvider.ForStandardToolsJarVm>
,Constable
,ByteBuddyAgent.AttachmentProvider
- Enclosing interface:
- ByteBuddyAgent.AttachmentProvider
public static enum ByteBuddyAgent.AttachmentProvider.ForStandardToolsJarVm
extends 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 class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
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 ConstantsEnum ConstantDescriptionAn attachment provider that locates the tools.jar from a Java installation directory.An attachment provider that locates the tools.jar from a Java home directory.An attachment provider that locates the tools.jar as it is set for several JVM installations on Apple Macintosh computers. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
The Java home system property.private final String
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
ConstructorsModifierConstructorDescriptionprivate
ForStandardToolsJarVm
(String toolsJarPath) Creates a new attachment provider that loads the virtual machine class from the tools.jar. -
Method Summary
-
Enum Constant Details
-
JVM_ROOT
An attachment provider that locates the tools.jar from a Java home directory. -
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
An attachment provider that locates the tools.jar as it is set for several JVM installations on Apple Macintosh computers.
-
-
Field Details
-
JAVA_HOME_PROPERTY
The Java home system property.- See Also:
-
toolsJarPath
The path to the tools.jar file, starting from the Java home directory.
-
-
Constructor Details
-
ForStandardToolsJarVm
Creates a new attachment provider that loads the virtual machine class from the tools.jar.- Parameters:
toolsJarPath
- The path to the tools.jar file, starting from the Java home directory.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
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.
-