code: private void visit(Operation operation, Visitor<Operation> visitor)
     {
        visitor.visit(operation);
  
        if (operation instanceof CompositeOperation) {
           if (((CompositeOperation) operation).getOperations() != null) {
              for (Operation child : ((CompositeOperation) operation).getOperations()) {
                 visit(child, visitor);
              }
           }
        }
     }
docs: Method to call the visitor for the supplied {@link Operation} and recursively calls itself, if the
  {@link Operation} is a {@link CompositeOperation}.