code: @Override
    public boolean visit(final InjectionPlan<?> node) {
      if (node instanceof Constructor<?>) {
        return visit((Constructor<?>) node);
      } else if (node instanceof Subplan<?>) {
        return visit((Subplan<?>) node);
      } else if (node instanceof JavaInstance<?>) {
        return visit((JavaInstance<?>) node);
      }
      throw new ClassCastException(
          "Node " + node.getClass() + " cannot be casted to one of the known subclasses."
              + " Override this method to handle the case.");
    }
docs: Manually dispatch between different types of injection plan objects and call proper
  visit() method. Currently dispatches between Constructor, Subplan, RequiredSingleton,
  and JavaInstance types.
  
  @param node TANG injection plan node.
  @return true to proceed with the next node, false to cancel.
  @throws ClassCastException if argument is not one of Constructor, Subplan,
  RequiredSingleton, or JavaInstance.