Boolean (@NotNull PsiAnnotation psiAnnotation, @NotNull String parameter) { PsiAnnotationMemberValue attributeValue = psiAnnotation.findDeclaredAttributeValue(parameter); final JavaPsiFacade javaPsiFacade = JavaPsiFacade.getInstance(psiAnnotation.getProject()); Object constValue = javaPsiFacade.getConstantEvaluationHelper().computeConstantExpression(attributeValue); return constValue instanceof Boolean ? (Boolean) constValue : null; }