use of com.oracle.graal.pointsto.meta.AnalysisField in project graal by oracle.
the class BigBang method addSystemStaticField.
@SuppressWarnings("try")
public AnalysisType addSystemStaticField(Class<?> clazz, String fieldName) {
addSystemClass(clazz, false, false);
Field reflectField;
try {
try (Indent indent = debug.logAndIndent("add system static field %s in class %s", fieldName, clazz.getName())) {
reflectField = clazz.getField(fieldName);
AnalysisField field = metaAccess.lookupJavaField(reflectField);
field.registerAsAccessed();
TypeFlow<?> fieldFlow = field.getType().getTypeFlow(this, true);
fieldFlow.addUse(this, field.getStaticFieldFlow());
return field.getType();
}
} catch (NoSuchFieldException e) {
throw shouldNotReachHere("field not found: " + fieldName);
}
}
Aggregations