/** * Lookup the constructor. */ @Override public void initialize(AbstractSession session) throws DescriptorException { try { this.constructor = PrivilegedAccessHelper.getDeclaredConstructorFor(getType().getJavaClass(), new Class[] { DynamicTypeImpl.class }, true); this.constructor.setAccessible(true); } catch (NoSuchMethodException exception) { throw DescriptorException.noSuchMethodWhileInitializingInstantiationPolicy(getType().getName() + ".<Default Constructor>", getDescriptor(), exception); } }
entity = (DynamicEntityImpl) PrivilegedAccessHelper.invokeConstructor(this.getTypeConstructor(), new Object[] { getType() }); } catch (InvocationTargetException exception) { throw DescriptorException.targetInvocationWhileConstructorInstantiation(this.getDescriptor(), exception); for (DatabaseMapping mapping : getType().getMappingsRequiringInitialization()) { initializeValue(mapping, entity);