}
Collection<ClassDescriptor> descriptors = new ArrayList<ClassDescriptor>(types.length);
for (int index = 0; index < types.length; index++) {
DynamicType typ = types[index];
ClassDescriptor desc = typ.getDescriptor();
DynamicTypeImpl typImpl = ((DynamicTypeImpl)typ);
typImpl.setDescriptor(desc);
try {
Field dpmField = desc.getJavaClass().getField(DynamicPropertiesManager.PROPERTIES_MANAGER_FIELD);
DynamicPropertiesManager dpm = (DynamicPropertiesManager)dpmField.get(null);
dpm.setType(typImpl);
typImpl.setDynamicPropertiesManager(dpm);
}
catch (Exception e) {
// this is bad! Without the dpmField, not much to do but die :-( ...
e.printStackTrace();
return;