use of org.omg.CORBA.StructDef in project ACS by ACS-Community.
the class BACIIntrospector method getStructDef.
private DataStruct getStructDef(TypeCode tc) {
if (tc.kind() != TCKind.tk_struct)
return null;
try {
DataStruct ds = new DataStruct(tc.id());
Contained ctd = ra.lookupId(tc.id());
StructDef sd = StructDefHelper.narrow(ctd);
StructMember[] mems = sd.members();
for (int i = 0; i < mems.length; i++) {
DataType dt = new BACIDataType(getClassType(mems[i].type));
dt.setElement(getDef(mems[i].type));
ds.add(mems[i].name, dt);
}
return ds;
} catch (org.omg.CORBA.TypeCodePackage.BadKind e) {
e.printStackTrace();
return null;
}
}
Aggregations