Promise<Node> (Object object) { Node loaded = new Node(object, LeafState.get(object, model)); if (loaded.leafState == LeafState.ALWAYS || isObsolete()) return resolvedPromise(loaded); if (model instanceof AsyncChildrenProvider<?> provider) { Promise<? extends List<?>> childrenPromise = provider.getChildrenAsync(object); if (childrenPromise == null) throw new ProcessCanceledException(); // cancel this command return childrenPromise.then(children -> { loaded.children = load(children); return loaded; }); } return super.computeAsync(object); }