CompletableFuture<List<ReferenceType>> (VirtualMachine virtualMachine) { if (virtualMachine instanceof VirtualMachineImpl && isAsyncEnabled()) { return ((VirtualMachineImpl)virtualMachine).allClassesAsync(); } return toCompletableFuture(() -> virtualMachine.allClasses()); }