}
forStatement.setControl(loopControl);
} else {
ForEachControl forEachControl =
createNode(enhancedForControlContext, ForEachControl.class);
setModifiers(enhancedForControlContext, forEachControl);
TypeContext typeContext = getChild(enhancedForControlContext, TypeContext.class);
if (typeContext != null) {
forEachControl.setType(getAdapter(TypeAdapter.class).adapt(typeContext));
}
TerminalNode identifierNode =
getTerminalNode(enhancedForControlContext, JavaParser.Identifier);
if (identifierNode != null) {
forEachControl.setVariable(getAdapter(IdentifierAdapter.class).adapt(identifierNode));
}
ExpressionContext expressionContext =
getChild(enhancedForControlContext, ExpressionContext.class);
if (expressionContext != null) {
forEachControl.setIterable(
getAdapter(ExpressionAdapter.class).adapt(expressionContext));
}
forStatement.setControl(forEachControl);
}