void readStruct(TypeDescription typeDescription, Object object) throws Exception {
Field fields[] = typeDescription.getFields();
for(int i = 0; i < fields.length; ++ i) {
if((fields[i].getModifiers() & (Modifier.STATIC | Modifier.TRANSIENT)) == 0) { // neither static nor transient ?
MemberTypeInfo memberTypeInfo = typeDescription.getMemberTypeInfo(fields[i].getName());
// default the member type to the declared type
Class zInterface = fields[i].getType();
if(memberTypeInfo != null) {
if(memberTypeInfo.isAny()) // is the member an any?
if(zInterface.isArray())
zInterface = Class.forName("[Lcom.sun.star.uno.Any;");
else
zInterface = Any.class;
else if(memberTypeInfo.isInterface()) { // is the member an interface ?
Class xInterface = zInterface;
if(!XInterface.class.isAssignableFrom(fields[i].getType())) // is the member type not derived of XInterface ?
xInterface = XInterface.class; // ensure that we get at least an XInterface