}
}
if (getUnknown && setUnknown) {
attrAttribs |= PropertyAttribute.OPTIONAL;
}
XTypeDescription t = attr.getType();
for (;;) {
t = resolveTypedefs(t);
short n;
if (t.getName().startsWith(
"com.sun.star.beans.Ambiguous<"))
{
n = PropertyAttribute.MAYBEAMBIGUOUS;
} else if (t.getName().startsWith(
"com.sun.star.beans.Defaulted<"))
{
n = PropertyAttribute.MAYBEDEFAULT;
} else if (t.getName().startsWith(
"com.sun.star.beans.Optional<"))
{
n = PropertyAttribute.MAYBEVOID;
} else {
break;
}
attrAttribs |= n;
t = ((XStructTypeDescription) UnoRuntime.queryInterface(
XStructTypeDescription.class, t)).
getTypeArguments()[0];
}
String name = members[i].getMemberName();
boolean present = true;
if (absentOptional != null) {
for (int j = 0; j < absentOptional.length; ++j) {
if (name.equals(absentOptional[j])) {
present = false;
break;
}
}
}
if (map.put(
name,
new PropertyData(
new Property(
name, handleNames.size(),
new Type(t.getName(), t.getTypeClass()),
attrAttribs),
present))
!= null)
{
throw new RuntimeException(