| /** |
| * Copyright (c) 2011, 2016 - Lunifera GmbH (Wien), Loetz GmbH&Co.KG (Heidelberg) |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License 2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Based on ideas from Xtext, Xtend, Xcore |
| * |
| * Contributors: |
| * Florian Pirchner - Initial implementation |
| * |
| */ |
| package org.eclipse.osbp.dsl.semantic.common.types.impl; |
| |
| import java.lang.reflect.InvocationTargetException; |
| |
| import org.eclipse.emf.common.util.EList; |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.EObject; |
| import org.eclipse.emf.ecore.InternalEObject; |
| import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; |
| import org.eclipse.emf.ecore.resource.Resource; |
| import org.eclipse.emf.ecore.resource.ResourceSet; |
| import org.eclipse.osbp.dsl.semantic.common.types.LLazyResolver; |
| import org.eclipse.osbp.dsl.semantic.common.types.OSBPTypesPackage; |
| import org.eclipse.osbp.xtext.oxtype.resource.EcoreUtil3; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>LLazy Resolver</b></em>'. |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public class LLazyResolverImpl extends MinimalEObjectImpl.Container implements LLazyResolver { |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected LLazyResolverImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return OSBPTypesPackage.Literals.LLAZY_RESOLVER; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EObject eResolveProxy(final InternalEObject proxy) { |
| Resource _eResource = this.eResource(); |
| ResourceSet _resourceSet = null; |
| if (_eResource!=null) { |
| _resourceSet=_eResource.getResourceSet(); |
| } |
| return EcoreUtil3.resolve(proxy, _resourceSet); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { |
| switch (operationID) { |
| case OSBPTypesPackage.LLAZY_RESOLVER___ERESOLVE_PROXY__INTERNALEOBJECT: |
| return eResolveProxy((InternalEObject)arguments.get(0)); |
| } |
| return super.eInvoke(operationID, arguments); |
| } |
| |
| } //LLazyResolverImpl |