ResolverProcessor (PsiElement element, GroovyPsiElement place) { if (element instanceof PsiMethod) { return new MethodResolverProcessor(null, place, false, null, null, PsiType.EMPTY_ARRAY); } else if (element instanceof PsiField) { return new PropertyResolverProcessor(null, place); } else if (element instanceof PsiClass) { return new ClassResolverProcessor(null, place); } throw new IllegalArgumentException("element must be method or field or class: " + element.getClass() + ", text=" + element.getText()); }