Boolean (final PsiVariable variable) { if (!(variable instanceof PsiField)) return null; PsiClass psiClass = ((PsiField)variable).getContainingClass(); if (psiClass == null || !CommonClassNames.JAVA_LANG_BOOLEAN.equals(psiClass.getQualifiedName())) return null; @NonNls String name = variable.getName(); return "TRUE".equals(name) ? Boolean.TRUE : "FALSE".equals(name) ? Boolean.FALSE : null; }