return instanceOf;
}
if (hasTerminalNode(context, JavaParser.QUESTION)) {
TernaryExpression ternaryExpression = createNode(context, TernaryExpression.class);
Iterator<ExpressionContext> expressionContexts =
getChildren(context, ExpressionContext.class).iterator();
if (expressionContexts.hasNext()) {
ternaryExpression.setCondition(
getAdapter(ExpressionAdapter.class).adapt(expressionContexts.next()));
}
if (expressionContexts.hasNext()) {
ternaryExpression.setThenExpression(
getAdapter(ExpressionAdapter.class).adapt(expressionContexts.next()));
}
if (expressionContexts.hasNext()) {
ternaryExpression.setElseExpression(
getAdapter(ExpressionAdapter.class).adapt(expressionContexts.next()));
}
return ternaryExpression;
}