@SuppressWarnings("unchecked")
	default <T extends PathNode<?>> boolean onPath(@Nonnull Class<T> type, @Nonnull Consumer<T> action) {
		if (type == getClass()) {
			action.accept((T) this);
			return true;
		} else {
			PathNode<?> parent = getParent();
			if (parent != null)
				return parent.onPath(type, action);
			return false;
		}
	}
@param type
		Some {@link PathNode} type.
@param action
		Action to run on the discovered path node.
		If no path node is found, the action is not run.
@param <T>
		Implied path type.

@return {@code true} when a matching path node was found and the action was run.
recaf-core/src/main/java/software/coley/recaf/path/PathNode.java