1 19 package org.netbeans.modules.javacore.jmiimpl.javamodel; 20 21 import org.netbeans.mdr.persistence.StorageException; 22 import org.netbeans.mdr.storagemodel.StorableBaseObject; 23 import org.netbeans.mdr.storagemodel.StorableClass; 24 import org.netbeans.mdr.storagemodel.StorableObject; 25 26 30 public abstract class MEFactory extends MetadataElementClass { 31 32 public MEFactory(StorableClass s) { 33 super(s); 34 } 35 36 protected MetadataElement create(MetadataElement parent) { 37 try { 38 StorableBaseObject s = _getDelegate(); 39 DeferredObject o = new DeferredObject(null, s.getMdrStorage(), s.getImmediatePackageId(), s.getOutermostPackageId(), s.getMetaObject(), (StorableClass) s, parent == null ? null : (StorableObject) parent._getDelegate()); 40 MetadataElement result = (MetadataElement) _getRepository().getHandler(o); 41 return result; 42 } catch (StorageException e) { 43 throw new RuntimeException (); 44 } 45 } 46 } 47 | Popular Tags |