public EObject eResolveProxy(InternalEObject proxy) { return EcoreUtil.resolve(proxy, this); }
public EObject eResolveProxy(InternalEObject proxy) { return EcoreUtil.resolve(proxy, this); }
/** * Returns the resolved object represented by proxy. Proxy chains are followed. * If resourceContext is null or not in a resource set, the global package registry is * consulted to obtain a package registered against the proxy URI, less its fragment, * in the same manner as the default resource set implementation's fall-back behaviour. * @param proxy the proxy to be resolved. * @param resourceContext a context resource whose resource set is used for the resolve. * @return the resolved object, or the proxy if unable to resolve. */ public static EObject resolve(EObject proxy, Resource resourceContext) { return resolve(proxy, resourceContext != null ? resourceContext.getResourceSet() : null); }
/** * Returns the resolved object represented by proxy. Proxy chains are followed. * If resourceContext is null or not in a resource set, the global package registry is * consulted to obtain a package registered against the proxy URI, less its fragment, * in the same manner as the default resource set implementation's fall-back behaviour. * @param proxy the proxy to be resolved. * @param resourceContext a context resource whose resource set is used for the resolve. * @return the resolved object, or the proxy if unable to resolve. */ public static EObject resolve(EObject proxy, Resource resourceContext) { return resolve(proxy, resourceContext != null ? resourceContext.getResourceSet() : null); }
public static JvmType findJvmType(URI uri, EObject context) { InternalEObject proxy = (InternalEObject) TypesFactory.eINSTANCE.createJvmVoid(); proxy.eSetProxyURI(uri); JvmType result = (JvmType) EcoreUtil.resolve(proxy, context); return result; } }
protected EObject getResolvedProxy(IEObjectDescription description) { EObject proxy = description.getEObjectOrProxy(); if (proxy.eIsProxy()) { proxy = EcoreUtil.resolve(proxy, context); } return proxy; }
private EPackage getResolvedEPackage(IEObjectDescription description, EObject context) { EObject resolved = EcoreUtil.resolve(description.getEObjectOrProxy(), context); if (resolved != null && !resolved.eIsProxy() && resolved instanceof EPackage) return (EPackage) resolved; return null; }
protected List<JvmType> createObjectReference(Resource resource) { if (resource != null) { // no upper bound found - seems to be an invalid - assume object as upper bound JvmType objectType = factory.createJvmGenericType(); String objectClassName = Object.class.getName(); ((InternalEObject) objectType).eSetProxyURI(URIHelperConstants.OBJECTS_URI.appendSegment( objectClassName).appendFragment(objectClassName)); objectType = (JvmType) EcoreUtil.resolve(objectType, resource); return Collections.singletonList(objectType); } return Collections.emptyList(); } }
public Module getModule() { if (module != null && module.eIsProxy()) { Module oldModule = module; module = (Module) EcoreUtil.resolve(module, this); if (module != oldModule) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, CommonarchivePackage.MODULE_REF__MODULE, oldModule, module)); } } return module; }
protected List<JvmType> createObjectReference(Resource resource) { if (resource != null) { // no upper bound found - seems to be an invalid - assume object as upper bound URI objectURI = new ClassURIHelper().getFullURI(Object.class); JvmType objectType = factory.createJvmGenericType(); ((InternalEObject)objectType).eSetProxyURI(objectURI); objectType = (JvmType) EcoreUtil.resolve(objectType, resource); return Collections.singletonList(objectType); } return Collections.emptyList(); } }
protected List<JvmType> createObjectReference(ResourceSet resourceSet) { // no upper bound found - seems to be an invalid - assume object as upper bound JvmType objectType = factory.createJvmGenericType(); String objectClassName = Object.class.getName(); ((InternalEObject) objectType).eSetProxyURI(URIHelperConstants.OBJECTS_URI.appendSegment(objectClassName).appendFragment(objectClassName)); objectType = (JvmType) EcoreUtil.resolve(objectType, resourceSet); return Collections.singletonList(objectType); } }
/** * @generated This field/method will be replaced during code generation */ public Module getModule() { if (module != null && module.eIsProxy()) { Module oldModule = module; module = (Module) EcoreUtil.resolve(module, this); if (module != oldModule) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, ModulemapPackage.MODULE_MAPPING__MODULE, oldModule, module)); } } return module; }
public static JvmType getType(final Class<?> clazz, final EObject context) { JvmType _xblockexpression = null; { JvmVoid _createJvmVoid = TypesFactory.eINSTANCE.createJvmVoid(); final InternalEObject proxy = ((InternalEObject) _createJvmVoid); proxy.eSetProxyURI(XFunctionTypeRefs.computeTypeUri(clazz)); EObject _resolve = EcoreUtil.resolve(proxy, context); _xblockexpression = ((JvmType) _resolve); } return _xblockexpression; } }
protected EObject resolveInternalProxy(EObject elementOrProxy, Resource resource) { if(elementOrProxy.eIsProxy() && ((InternalEObject) elementOrProxy).eProxyURI().trimFragment().equals(resource.getURI())) return EcoreUtil.resolve(elementOrProxy, resource); else return elementOrProxy; }
public EObject resolveJavaObjectURIProxy(InternalEObject proxy, JvmTypeReference sender) { if (indexedJvmTypeAccess != null) { EObject result = indexedJvmTypeAccess.getIndexedJvmType(proxy.eProxyURI(), getResourceSet()); if (result != null) { return result; } } return EcoreUtil.resolve(proxy, sender); }
/** * Handwritten version of getPrimaryKey(): */ public JavaClass getPrimaryKey() { if (primaryKey != null && primaryKey.eIsProxy()) { JavaClass oldPrimaryKey = primaryKey; JavaClass resolved = (JavaClass)EcoreUtil.resolve(primaryKey, this); resolved(this.primaryKey, resolved); this.primaryKey = resolved; if (primaryKey != oldPrimaryKey) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.ENTERPRISE_BEAN__EJB_CLASS, oldPrimaryKey, primaryKey)); } } return primaryKey; }
protected LightweightTypeReference createObjectReference(ITypeReferenceOwner owner, ResourceSet resourceSet) { // no upper bound found - seems to be an invalid - assume object as upper bound JvmType objectType = factory.createJvmGenericType(); String objectClassName = Object.class.getName(); ((InternalEObject) objectType).eSetProxyURI(URIHelperConstants.OBJECTS_URI.appendSegment(objectClassName).appendFragment(objectClassName)); objectType = (JvmType) EcoreUtil.resolve(objectType, resourceSet); return owner.newParameterizedTypeReference(objectType); } }
protected JvmTypeReference createObjectReference(Resource resource) { // no upper bound found - seems to be an invalid - assume object as upper bound JvmType objectType = factory.createJvmGenericType(); String objectClassName = Object.class.getName(); ((InternalEObject) objectType).eSetProxyURI(URIHelperConstants.OBJECTS_URI.appendSegment(objectClassName) .appendFragment(objectClassName)); if (resource != null) { objectType = (JvmType) EcoreUtil.resolve(objectType, resource); } JvmParameterizedTypeReference result = factory.createJvmParameterizedTypeReference(); result.setType(objectType); return result; } }
protected JvmTypeReference createObjectReference(Resource resource) { // no upper bound found - seems to be an invalid - assume object as upper bound JvmType objectType = factory.createJvmGenericType(); String objectClassName = Object.class.getName(); ((InternalEObject) objectType).eSetProxyURI(URIHelperConstants.OBJECTS_URI.appendSegment(objectClassName) .appendFragment(objectClassName)); if (resource != null) { objectType = (JvmType) EcoreUtil.resolve(objectType, resource); } JvmParameterizedTypeReference result = factory.createJvmParameterizedTypeReference(); result.setType(objectType); return result; } }
protected JvmTypeReference createObjectReference(Resource resource) { // no upper bound found - seems to be an invalid - assume object as upper bound URI objectURI = new ClassURIHelper().getFullURI(Object.class); JvmType objectType = factory.createJvmGenericType(); ((InternalEObject)objectType).eSetProxyURI(objectURI); if (resource != null) { objectType = (JvmType) EcoreUtil.resolve(objectType, resource); } JvmParameterizedTypeReference result = factory.createJvmParameterizedTypeReference(); result.setType(objectType); return result; } }