/** * Copyright (c) 2012-2016 Marsha Chechik, Alessio Di Sandro, Michalis Famelis, * Rick Salay. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Alessio Di Sandro - Implementation. */ package edu.toronto.cs.se.mmint.mid.relationship.impl; import java.lang.reflect.InvocationTargetException; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import edu.toronto.cs.se.mmint.mid.ExtendibleElement; import edu.toronto.cs.se.mmint.mid.ExtendibleElementEndpoint; import edu.toronto.cs.se.mmint.mid.relationship.ExtendibleElementEndpointReference; import edu.toronto.cs.se.mmint.mid.relationship.ExtendibleElementReference; import edu.toronto.cs.se.mmint.mid.relationship.RelationshipPackage; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Extendible Element Endpoint Reference</b></em>'. * <!-- end-user-doc --> * * @generated */ public abstract class ExtendibleElementEndpointReferenceImpl extends ExtendibleElementReferenceImpl implements ExtendibleElementEndpointReference { /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected ExtendibleElementEndpointReferenceImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return RelationshipPackage.Literals.EXTENDIBLE_ELEMENT_ENDPOINT_REFERENCE; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getTargetUri() { ExtendibleElementEndpoint object = this.getObject(); return (object == null) ? null : object.getTargetUri(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ExtendibleElementEndpoint getObject() { ExtendibleElement object = super.getObject(); return (object == null) ? null : (ExtendibleElementEndpoint) object; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ExtendibleElementEndpointReference getSupertypeRef() { ExtendibleElementReference supertypeRef = super.getSupertypeRef(); return (supertypeRef == null) ? null : (ExtendibleElementEndpointReference) supertypeRef; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public int eDerivedOperationID(int baseOperationID, Class<?> baseClass) { if (baseClass == ExtendibleElementReference.class) { switch (baseOperationID) { case RelationshipPackage.EXTENDIBLE_ELEMENT_REFERENCE___GET_OBJECT: return RelationshipPackage.EXTENDIBLE_ELEMENT_ENDPOINT_REFERENCE___GET_OBJECT; default: return super.eDerivedOperationID(baseOperationID, baseClass); } } return super.eDerivedOperationID(baseOperationID, baseClass); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { switch (operationID) { case RelationshipPackage.EXTENDIBLE_ELEMENT_ENDPOINT_REFERENCE___GET_OBJECT: return getObject(); case RelationshipPackage.EXTENDIBLE_ELEMENT_ENDPOINT_REFERENCE___GET_SUPERTYPE_REF: return getSupertypeRef(); case RelationshipPackage.EXTENDIBLE_ELEMENT_ENDPOINT_REFERENCE___GET_TARGET_URI: return getTargetUri(); } return super.eInvoke(operationID, arguments); } } //ExtendibleElementEndpointReferenceImpl