Search in sources :

Example 1 with RawStructure

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;
}
Also used : CStruct(org.graalvm.nativeimage.c.struct.CStruct) RawStructure(org.graalvm.nativeimage.c.struct.RawStructure)

Aggregations

CStruct (org.graalvm.nativeimage.c.struct.CStruct)1 RawStructure (org.graalvm.nativeimage.c.struct.RawStructure)1