Package net.bytebuddy.agent
Class ByteBuddyAgent.ProcessProvider.ForCurrentVm.ForJava9CapableVm
- java.lang.Object
-
- net.bytebuddy.agent.ByteBuddyAgent.ProcessProvider.ForCurrentVm.ForJava9CapableVm
-
- All Implemented Interfaces:
ByteBuddyAgent.ProcessProvider
- Enclosing class:
- ByteBuddyAgent.ProcessProvider.ForCurrentVm
protected static class ByteBuddyAgent.ProcessProvider.ForCurrentVm.ForJava9CapableVm extends java.lang.Object implements ByteBuddyAgent.ProcessProvider
A process provider for a Java 9 capable VM with access to the introduced process API.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.agent.ByteBuddyAgent.ProcessProvider
ByteBuddyAgent.ProcessProvider.ForCurrentVm
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ForJava9CapableVm(java.lang.reflect.Method current, java.lang.reflect.Method pid)
Creates a new Java 9 capable dispatcher for reading the current process's id.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ByteBuddyAgent.ProcessProvider
make()
Attempts to create a dispatcher for a Java 9 VM and falls back to a legacy dispatcher if this is not possible.java.lang.String
resolve()
Resolves a process id for the current JVM.
-
-
-
Constructor Detail
-
ForJava9CapableVm
protected ForJava9CapableVm(java.lang.reflect.Method current, java.lang.reflect.Method pid)
Creates a new Java 9 capable dispatcher for reading the current process's id.- Parameters:
current
- Thejava.lang.ProcessHandle#current()
method.pid
- Thejava.lang.ProcessHandle#pid()
method.
-
-
Method Detail
-
make
public static ByteBuddyAgent.ProcessProvider make()
Attempts to create a dispatcher for a Java 9 VM and falls back to a legacy dispatcher if this is not possible.- Returns:
- A dispatcher for the current VM.
-
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.
-
-