Visit a complex type which visits each of its children in turn.
<p/>
Optional children may be skipped.

@param type the complex type to visit
@param callback a function that is invoked for each child in turn after
it has been visited
324273
public void visitComplexType(CobolComplexType type,
            ComplexTypeChildHandler callback) {

        cobolNamesStack.push(type.getCobolName());
        int index = 0;
        for (Entry < String, CobolType > child : type.getFields().entrySet()) {
            CobolType childType = child.getValue();
            String childName = child.getKey();
            curFieldName = childName;
            if (childType instanceof CobolOptionalType
                    && !isPresent((CobolOptionalType) childType)) {
                index++;
                continue;
            }
            if (!callback.preVisit(childName, index, childType)) {
                break;
            }

            childType.accept(this);

            if (!callback.postVisit(childName, index, childType)) {
                break;
            }
            index++;
        }
        cobolNamesStack.pop();
    }
1141483
public void removeAll(Class<? extends ProcessListener> type) {
    for (Iterator<ProcessListener> it = children.iterator(); it.hasNext();) {
      if (type.isInstance(it.next()))
        it.remove();
    }
  }
307563
@Override public void visitTypeApply(JCTypeApply tree) {
		print(tree.clazz);
		print("<");
		print(tree.arguments, ", ");
		print(">");
	}
825071
private void executeGlobalListeners(CallbackType callbackType, Object entity) {
    if (globalCallbacks == null) {
      return;
    }
    List<CallbackMetadata> callbacks = globalCallbacks.get(callbackType);
    if (callbacks == null) {
      return;
    }
    for (CallbackMetadata callback : callbacks) {
      Object listener = ListenerFactory.getInstance().getListener(callback.getListenerClass());
      invokeCallbackMethod(callback.getCallbackMethod(), listener, entity);
    }
  }
1113436
@Override
    public final void visitClass(@Nullable JavaTypeElement oldType, @Nullable JavaTypeElement newType) {
        depth++;
        doVisitClass(oldType, newType);
    }
4801
protected void visitChildren(ParentNode<? extends N> node) {
    List<? extends N> children = node.getChildren();
    int size = children.size();
    for (int i = 0; i < size; i++) {
      visit(children.get(i));
    }
  }
829352
function (callback, context) {
        callback.call(context, this);
        var _children = this._children;
        for(var i = 0, len = _children.length; i < len; i++) {
            _children[i].traverse(callback, context);
        }
    }
355362
function(type, callback) {
        var list = this.__hooks[type] || [];
            list.push(callback);

        this.__hooks[type] = list;
    }
814355
@SuppressWarnings("unchecked")
  public <C extends CDACallback<CDAArray>> C all(C callback) {
    return (C) Callbacks.subscribeAsync(baseQuery().all(), callback, client);
  }
1044706
function all(type, callback) {
      if (!wm.get(callback)) {
        wm.set(callback, function fn() {
          invoke = false;
          when(type, fn);
          invoke = true;
          resolve(arguments).then(bind.call(broadcast, callback));
        });
        when(type, wm.get(callback));
      }
    }
1349449
def render(self, type, rerender=False):
        """"""
        for child in self.children:
            child.render(type, rerender)
1109520
private static Set<Type> getChildTypes(final Type _type)
        throws CacheReloadException
    {
        final Set<Type> ret = new HashSet<Type>();
        ret.add(_type);
        for (final Type child : _type.getChildTypes()) {
            ret.addAll(getChildTypes(child));
        }
        return ret;
    }
1292033
public static function registerCustomType($type, $callback)
    {
        if (!is_callable($callback)) {
            throw new \Exception(__('callback_is_not_function_exception'));
        }

        self::$custom_types[$type]= ['callback' => $callback];
    }
1082326
public function addCallback( $type, $callback ) {
		if ( !isset( $this->callbacks[$type] ) ) {
			$this->callbacks[$type] = [];
		}
		$this->callbacks[$type][] = $callback;
	}
1129565
@SuppressWarnings({"unchecked"})
    public void loopOrSingle(final Object x, final IterCallback<V> callback) {
        if (x == null) {
            return;
        }

        //A collection
        if (x instanceof Collection<?>) {
            final Collection<?> l = (Collection<?>) x;
            for (final Object o : l) {
                callback.eval((V) o);
            }
            return;
        }

        //An array of Object[]
        if (x.getClass().isArray()) {
            for (final Object o : (Object[]) x) {
                callback.eval((V) o);
            }
            return;
        }

        callback.eval((V) x);
    }
611923
function(callback, opt_this) {
      function visit(ec) {
        callback.call(opt_this, ec);
        ec.iterateAllChildEventContainers(visit);
      }
      visit(this);
    }
798735
public void setType(TYPE type) {
    if(type == null) {
      type = TYPE.UNSET;
    }
    this.type = type;
  }