Package net.bytebuddy.agent
Enum ByteBuddyAgent.ProcessProvider.ForCurrentVm
- java.lang.Object
-
- java.lang.Enum<ByteBuddyAgent.ProcessProvider.ForCurrentVm>
-
- net.bytebuddy.agent.ByteBuddyAgent.ProcessProvider.ForCurrentVm
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ByteBuddyAgent.ProcessProvider.ForCurrentVm>
,ByteBuddyAgent.ProcessProvider
- Enclosing interface:
- ByteBuddyAgent.ProcessProvider
public static enum ByteBuddyAgent.ProcessProvider.ForCurrentVm extends java.lang.Enum<ByteBuddyAgent.ProcessProvider.ForCurrentVm> implements ByteBuddyAgent.ProcessProvider
Supplies the current VM's process id.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
ByteBuddyAgent.ProcessProvider.ForCurrentVm.ForJava9CapableVm
A process provider for a Java 9 capable VM with access to the introduced process API.protected static class
ByteBuddyAgent.ProcessProvider.ForCurrentVm.ForLegacyVm
A process provider for a legacy VM that reads the process id from its JMX properties.-
Nested classes/interfaces inherited from interface net.bytebuddy.agent.ByteBuddyAgent.ProcessProvider
ByteBuddyAgent.ProcessProvider.ForCurrentVm
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
The singleton instance.
-
Field Summary
Fields Modifier and Type Field Description private ByteBuddyAgent.ProcessProvider
dispatcher
The best process provider for the current VM.
-
Constructor Summary
Constructors Modifier Constructor Description private
ForCurrentVm()
Creates a process provider that supplies the current VM's process id.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
resolve()
Resolves a process id for the current JVM.static ByteBuddyAgent.ProcessProvider.ForCurrentVm
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ByteBuddyAgent.ProcessProvider.ForCurrentVm[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final ByteBuddyAgent.ProcessProvider.ForCurrentVm INSTANCE
The singleton instance.
-
-
Field Detail
-
dispatcher
private final ByteBuddyAgent.ProcessProvider dispatcher
The best process provider for the current VM.
-
-
Method Detail
-
values
public static ByteBuddyAgent.ProcessProvider.ForCurrentVm[] 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.ProcessProvider.ForCurrentVm c : ByteBuddyAgent.ProcessProvider.ForCurrentVm.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.ProcessProvider.ForCurrentVm 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
-
resolve
public java.lang.String resolve()
Resolves a process id for the current JVM.- Specified by:
resolve
in interfaceByteBuddyAgent.ProcessProvider
- Returns:
- The resolved process id.
-
-