PsiLiteralExpression (@Nullable PsiExpression expression) { expression = PsiUtil.skipParenthesizedExprDown(expression); if (expression instanceof PsiLiteralExpression literal) return literal; if (!(expression instanceof PsiTypeCastExpression typeCastExpression)) return null; final PsiExpression operand = PsiUtil.skipParenthesizedExprDown(typeCastExpression.getOperand()); return operand instanceof PsiLiteralExpression literal ? literal : null; }