.getOperator()))
throw new DefinitelyNotEnumerizableOperationException(
Messages.ASTNodeProcessor_IllegalAssignmentExpression, assignment
.getOperator(), node);
else
throw new NonEnumerizableOperationException(
Messages.ASTNodeProcessor_IllegalAssignmentExpression, assignment
.getOperator(), node);
break;
}
case ASTNode.CONDITIONAL_EXPRESSION: {
final ConditionalExpression ce = (ConditionalExpression) node;
this.processExpression(ce.getThenExpression());
this.processExpression(ce.getElseExpression());
break;
}
case ASTNode.FIELD_ACCESS: {
final FieldAccess fieldAccess = (FieldAccess) node;
if (fieldAccess.resolveFieldBinding().getJavaElement() == null)
throw new DefinitelyNotEnumerizableException(
Messages.ASTNodeProcessor_NonEnumerizableTypeEncountered, node);
else {
final IJavaElement elem = fieldAccess.resolveFieldBinding()
.getJavaElement();
if (elem.isReadOnly() || fieldAccess.resolveBoxing())
throw new DefinitelyNotEnumerizableException(
Messages.ASTNodeProcessor_SourceNotPresent, node);
if (fieldAccess.resolveTypeBinding().isEqualTo(
node.getAST().resolveWellKnownType("java.lang.Object"))) //$NON-NLS-1$
throw new NonEnumerizableASTException(
Messages.ASTNodeProcessor_IllegalArrayUpcast, fieldAccess);
this.found.add(elem);
}
break;
}
case ASTNode.INFIX_EXPRESSION: {
final InfixExpression ie = (InfixExpression) node;
final InfixExpression.Operator op = ie.getOperator();
if (Util.isLegalInfixOperator(op)) {
if (Util.inNeedOfTransformation(op)) {
final ISourceRange range = new SourceRange(ie
.getStartPosition(), ie.getLength());
this.legalEncounteredInfixExpressionSourceLocations
.add(range);
}
this.processExpression(ie.getLeftOperand());
this.processExpression(ie.getRightOperand());
}
else if (!Util.isSuspiciousInfixOperator(op))
throw new DefinitelyNotEnumerizableOperationException(
Messages.ASTNodeProcessor_IllegalInfixExpression, op, node);
else
throw new NonEnumerizableOperationException(
Messages.ASTNodeProcessor_IllegalInfixExpression, op, node);
break;
}
case ASTNode.METHOD_INVOCATION: {