接口的使用
java.lang.ProcessHandle
使用 ProcessHandle 的包
-
ProcessHandle 在 java.lang 中的用法
java.lang 中返回 ProcessHandle 的方法修饰符和类型方法描述static ProcessHandleProcessHandle.current()返回当前进程的 ProcessHandle。Process.toHandle()返回进程的 ProcessHandle。返回类型中包含 ProcessHandle 类型参数的 java.lang 中的方法修饰符和类型方法描述static Stream<ProcessHandle>ProcessHandle.allProcesses()返回当前进程可见的所有进程的快照。Process.children()返回进程的直接子进程的快照。ProcessHandle.children()返回进程当前直接子进程的快照。Process.descendants()返回进程后代的快照。ProcessHandle.descendants()返回进程后代的快照。static Optional<ProcessHandle>ProcessHandle.of(long pid) 为现有本机进程返回Optional<ProcessHandle>。ProcessHandle.onExit()返回CompletableFuture<ProcessHandle>以终止进程。ProcessHandle.parent()为父进程返回一个Optional<ProcessHandle>。java.lang 中的方法,参数类型为 ProcessHandle修饰符和类型方法描述intProcessHandle.compareTo(ProcessHandle other) 将此 ProcessHandle 与指定的 ProcessHandle 进行比较以获取订单。