* @param myOM ObjectManager
* @param pcClass The class of the object that this will manage the state for
*/
protected Initialization(ObjectManager myOM, Class pcClass)
{
ClassLoaderResolver clr = myOM.getClassLoaderResolver();
if (myOM.getOMFContext().getTypeManager().isReferenceType(pcClass))
{
// TODO interfaces
// in this case JPOX supports only one level for interfaces. in case of many levels, JPOX supports only one branch
cmd = myOM.getMetaDataManager().getMetaDataForImplementationOfReference(pcClass, null, clr);
// calling the CLR will make sure the class is initialized
this.pcClass = clr.classForName(cmd.getFullClassName(), pcClass.getClassLoader(), true);
}
else
{
try
{
// calling the CLR will make sure the class is initialized
this.pcClass = clr.classForName(pcClass.getName(), pcClass.getClassLoader(), true);
cmd = myOM.getMetaDataManager().getMetaDataForClass(pcClass, clr);
}
catch (ClassNotResolvedException e)
{