PolymorphicPNamingContext polymorphicPNC = (PolymorphicPNamingContext) pnc;
//link the cache
//cache null
polymorphicPNC.setCache(this.cache);
//instanciate a new binder
PBinder delegatedBinder = getPBinder(className, hints, classLoader,
mappingStructureRule, cn2binder, cn2pnc);
//link a new instanciated and dedicated binder
polymorphicPNC.setDelegatedBinder(delegatedBinder);
delegatedBinder.setPClassMapping(pcm);
delegatedBinder.setPType(pcm.getPType());
//link the PClassMapping
polymorphicPNC.setPcm(delegatedBinder.getBinderClassMapping());
}
} catch (Exception e) {
throw new PException(e,
"Impossible to instanciate the PNC of the class "
+ hints);