final IMethodBinding binding= node.resolveMethodBinding(); if (binding != null && binding.getName().equals("iterator")) { final Expression qualifier= node.getExpression(); if (qualifier != null) { final ITypeBinding type= qualifier.resolveTypeBinding(); if (type != null) { final ITypeBinding iterable= getSuperType(type, "java.lang.Iterable"); if (iterable != null) { fExpression= qualifier; if (qualifier instanceof Name) { final Name name= (Name) qualifier; fIterable= name.resolveBinding(); } else if (qualifier instanceof MethodInvocation) { final MethodInvocation invocation= (MethodInvocation) qualifier; fIterable= invocation.resolveMethodBinding(); } else if (qualifier instanceof FieldAccess) { final FieldAccess access= (FieldAccess) qualifier; fIterable= access.resolveFieldBinding();
final IMethodBinding binding= node.resolveMethodBinding(); if (binding != null && binding.getName().equals("iterator")) { final Expression qualifier= node.getExpression(); if (qualifier != null) { final ITypeBinding type= qualifier.resolveTypeBinding(); if (type != null) { final ITypeBinding iterable= getSuperType(type, "java.lang.Iterable"); if (iterable != null) { fExpression= qualifier; if (qualifier instanceof Name) { final Name name= (Name) qualifier; fIterable= name.resolveBinding(); } else if (qualifier instanceof MethodInvocation) { final MethodInvocation invocation= (MethodInvocation) qualifier; fIterable= invocation.resolveMethodBinding(); } else if (qualifier instanceof FieldAccess) { final FieldAccess access= (FieldAccess) qualifier; fIterable= access.resolveFieldBinding(); }
						public final boolean visit(final MethodInvocation node) {							final IMethodBinding binding= node.resolveMethodBinding();							if (binding != null && binding.getName().equals("iterator")) { //$NON-NLS-1$								final Expression qualifier= node.getExpression();								if (qualifier != null) {									final ITypeBinding type= qualifier.resolveTypeBinding();									if (type != null) {										final ITypeBinding iterable= getSuperType(type, "java.lang.Iterable"); //$NON-NLS-1$										if (iterable != null) {											fExpression= qualifier;											if (qualifier instanceof Name) {												final Name name= (Name) qualifier;												fIterable= name.resolveBinding();											} else if (qualifier instanceof MethodInvocation) {												final MethodInvocation invocation= (MethodInvocation) qualifier;												fIterable= invocation.resolveMethodBinding();											} else if (qualifier instanceof FieldAccess) {												final FieldAccess access= (FieldAccess) qualifier;												fIterable= access.resolveFieldBinding();											}										}									}								}							}							return true;						}