void () { PsiField field = myClass.findFieldByName("FLOAT_CONST", false); assertNotNull(field); PsiLiteralExpression initializer = (PsiLiteralExpression)field.getInitializer(); assertNotNull(initializer); assertEquals(PsiTypes.floatType(), initializer.getType()); assertEquals(new Float(1.234f), initializer.getValue()); assertEquals("1.234f", initializer.getText()); assertEquals(new Float(1.234f), field.computeConstantValue()); }