boolean (@NotNull PsiElement element) { if (!(element instanceof GrLiteral expression)) { return false; } final PsiType type = expression.getType(); if (type == null) { return false; } if (!PsiTypes.intType().equals(type) && !PsiTypes.longType().equals(type) && !type.equalsToText("java.lang.Integer") && !type.equalsToText("java.lang.Long")) { return false; } @NonNls final String text = expression.getText(); return !(text.startsWith("0x") || text.startsWith("0X")); }