void (@NotNull PsiReferenceExpression expression) { if (myForCompletion) { final MyParentVisitor visitor = new MyParentVisitor(expression, true, myClassProvider, myVoidable, myUsedAfter, myMaxCandidates); expression.getParent().accept(visitor); myResult.addAll(visitor.myResult); return; } String referenceName = expression.getReferenceName(); if (referenceName != null) { final PsiElement parent = expression.getParent(); if (parent instanceof PsiMethodCallExpression) { Collections.addAll(myResult, findClassesWithDeclaredMethod((PsiMethodCallExpression)parent)); } else if (parent instanceof PsiVariable || parent instanceof PsiExpression) { if (LENGTH_SYNTHETIC_ARRAY_FIELD.equals(referenceName)) { myResult.addAll(anyArrayType()); } else { Collections.addAll(myResult, findClassesWithDeclaredField(expression)); } } } }