@Test public void getReturnsEmptyIfKernelQueryFails() { nameQuerier = (a, b, c, d) -> false; Optional<String> result = getter.get(handle); assertFalse(result.isPresent()); }
@Override public Optional<String> get(ProcessHandle processHandle) { Objects.requireNonNull(processHandle, "processHandle cannot be null!"); return getProcessImageName(processHandle.getNativeHandle()); }
WindowsProcessDescriptionGetter implements ProcessDescriptionGetter { @Override public Optional<String> get(ProcessHandle processHandle) { Objects.requireNonNull(processHandle, "processHandle cannot be null!"); return getProcessImageName(processHandle.getNativeHandle()); } }
WindowsProcessDescriptionGetter implements ProcessDescriptionGetter { @Override public Optional<String> get(ProcessHandle processHandle) { Objects.requireNonNull(processHandle, "processHandle cannot be null!"); return getProcessImageName(processHandle.getNativeHandle()); } WindowsProcessDescriptionGetter(QueryFullProcessImageName winapi); }
WindowsProcessDescriptionGetter implements ProcessDescriptionGetter { @Override public Optional<String> get(ProcessHandle processHandle) { Objects.requireNonNull(processHandle, "processHandle cannot be null!"); return getProcessImageName(processHandle.getNativeHandle()); } WindowsProcessDescriptionGetter(QueryFullProcessImageName winapi); @Override Optional<String> get(ProcessHandle processHandle); }
WindowsProcessDescriptionGetter implements ProcessDescriptionGetter { @Override public Optional<String> get(ProcessHandle processHandle) { Objects.requireNonNull(processHandle, "processHandle cannot be null!"); return getProcessImageName(processHandle.getNativeHandle()); } WindowsProcessDescriptionGetter(QueryFullProcessImageName winapi); @Override Optional<String> get(ProcessHandle processHandle);  }