boolean (@NotNull PsiLiteralExpression literal) { if (!PsiTypes.intType().equals(literal.getType())) return false; String text = literal.getText(); if (!text.startsWith("0x") && !text.startsWith("0X")) return false; Integer value = tryCast(literal.getValue(), Integer.class); return value != null && value < 0; }