this.entityType = new DynamicTypeImpl(descriptor, parentType);
// JAXB generates some classes that do not conform to DynamicEntity interface - ignore
if (DynamicEntity.class.isAssignableFrom(dynamicClass)) {
try {
Field dpmField = dynamicClass.getField(DynamicPropertiesManager.PROPERTIES_MANAGER_FIELD);
DynamicPropertiesManager dpm = (DynamicPropertiesManager)dpmField.get(null);
dpm.setType(entityType);
entityType.setDynamicPropertiesManager(dpm);
}
catch (Exception e) {
// this is bad! Without the dpmField, not much to do but die :-( ...
e.printStackTrace();