use of org.graalvm.nativeimage.c.struct.RawStructure in project graal by oracle.
the class InfoTreeBuilder method getStructName.
private static String getStructName(ResolvedJavaType type) {
CStruct structAnnotation = type.getAnnotation(CStruct.class);
if (structAnnotation == null) {
RawStructure rsanno = type.getAnnotation(RawStructure.class);
assert rsanno != null : "Unexpected struct type " + type;
return getSimpleJavaName(type);
}
String name = structAnnotation.value();
if (name.length() == 0) {
name = getSimpleJavaName(type);
}
if (structAnnotation.addStructKeyword()) {
name = "struct " + name;
}
return name;
}
Aggregations