use of com.oracle.svm.configure.config.FieldInfo in project graal by oracle.
the class TypeMethodsWithFlagsTest method doTestFields.
private static void doTestFields(TypeConfiguration typeConfig) {
ConfigurationType fieldTestType = getConfigTypeOrFail(typeConfig, "MethodAndFieldTest");
Assert.assertNull(ConfigurationType.TestBackdoor.getFieldInfoIfPresent(fieldTestType, "SimpleField"));
Assert.assertNull(ConfigurationType.TestBackdoor.getFieldInfoIfPresent(fieldTestType, "AllowWriteField"));
FieldInfo newField = ConfigurationType.TestBackdoor.getFieldInfoIfPresent(fieldTestType, "NewField");
Assert.assertFalse(newField.isFinalButWritable());
FieldInfo newWritableField = getFieldInfoOrFail(fieldTestType, "NewAllowWriteField");
Assert.assertTrue(newWritableField.isFinalButWritable());
FieldInfo newlyWritableField = getFieldInfoOrFail(fieldTestType, "NewNowWritableField");
Assert.assertTrue(newlyWritableField.isFinalButWritable());
}
use of com.oracle.svm.configure.config.FieldInfo in project graal by oracle.
the class TypeMethodsWithFlagsTest method getFieldInfoOrFail.
private static FieldInfo getFieldInfoOrFail(ConfigurationType type, String field) {
FieldInfo fieldInfo = ConfigurationType.TestBackdoor.getFieldInfoIfPresent(type, field);
Assert.assertNotNull(fieldInfo);
return fieldInfo;
}
Aggregations