void () { PsiField field = myClass.findFieldByName("STRING_CONST", false); assertNotNull(field); PsiLiteralExpression initializer = (PsiLiteralExpression)field.getInitializer(); assertNotNull(initializer); PsiType type = initializer.getType(); assertNotNull(type); assertTrue(type.equalsToText("java.lang.String")); assertEquals("a\r\n\"bcd", initializer.getValue()); assertEquals("\"a\\r\\n\\\"bcd\"", initializer.getText()); assertEquals("a\r\n\"bcd", field.computeConstantValue()); }