DfType (PsiMethod method) { String fieldName = "EMPTY_" + method.getName().substring("empty".length()).toUpperCase(Locale.ROOT); PsiClass collectionsClass = method.getContainingClass(); if (collectionsClass == null) return DfType.TOP; PsiField field = collectionsClass.findFieldByName(fieldName, false); if (field == null) return DfType.TOP; return referenceConstant(field, field.getType()); }