All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.uml2.uml.internal.impl.MessageEndImpl Maven / Gradle / Ivy

There is a newer version: 5.0.0-v20140602-0749
Show newest version
/*
 * Copyright (c) 2005, 2011 IBM Corporation, CEA, and others.
 * 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:
 *   IBM - initial API and implementation
 *   Kenn Hussey (CEA) - 327039
 *
 * $Id: MessageEndImpl.java,v 1.14 2007/04/25 17:47:00 khussey Exp $
 */
package org.eclipse.uml2.uml.internal.impl;

import java.util.Collection;
import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EAnnotation;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

import org.eclipse.uml2.uml.Comment;
import org.eclipse.uml2.uml.Dependency;
import org.eclipse.uml2.uml.Message;
import org.eclipse.uml2.uml.MessageEnd;
import org.eclipse.uml2.uml.StringExpression;
import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.VisibilityKind;

/**
 * 
 * An implementation of the model object 'Message End'.
 * 
 * 

* The following features are implemented: *

    *
  • {@link org.eclipse.uml2.uml.internal.impl.MessageEndImpl#getMessage Message}
  • *
*

* * @generated */ public abstract class MessageEndImpl extends NamedElementImpl implements MessageEnd { /** * The cached value of the '{@link #getMessage() Message}' reference. * * * @see #getMessage() * @generated * @ordered */ protected Message message; /** * * * @generated */ protected MessageEndImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return UMLPackage.Literals.MESSAGE_END; } /** * * * @generated */ public Message getMessage() { if (message != null && message.eIsProxy()) { InternalEObject oldMessage = (InternalEObject) message; message = (Message) eResolveProxy(oldMessage); if (message != oldMessage) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, UMLPackage.MESSAGE_END__MESSAGE, oldMessage, message)); } } return message; } /** * * * @generated */ public Message basicGetMessage() { return message; } /** * * * @generated */ public void setMessage(Message newMessage) { Message oldMessage = message; message = newMessage; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, UMLPackage.MESSAGE_END__MESSAGE, oldMessage, message)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case UMLPackage.MESSAGE_END__EANNOTATIONS : return getEAnnotations(); case UMLPackage.MESSAGE_END__OWNED_COMMENT : return getOwnedComments(); case UMLPackage.MESSAGE_END__OWNED_ELEMENT : return getOwnedElements(); case UMLPackage.MESSAGE_END__OWNER : if (resolve) return getOwner(); return basicGetOwner(); case UMLPackage.MESSAGE_END__CLIENT_DEPENDENCY : return getClientDependencies(); case UMLPackage.MESSAGE_END__NAME : return getName(); case UMLPackage.MESSAGE_END__NAME_EXPRESSION : if (resolve) return getNameExpression(); return basicGetNameExpression(); case UMLPackage.MESSAGE_END__NAMESPACE : if (resolve) return getNamespace(); return basicGetNamespace(); case UMLPackage.MESSAGE_END__QUALIFIED_NAME : return getQualifiedName(); case UMLPackage.MESSAGE_END__VISIBILITY : return getVisibility(); case UMLPackage.MESSAGE_END__MESSAGE : if (resolve) return getMessage(); return basicGetMessage(); } return eDynamicGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case UMLPackage.MESSAGE_END__EANNOTATIONS : getEAnnotations().clear(); getEAnnotations().addAll( (Collection) newValue); return; case UMLPackage.MESSAGE_END__OWNED_COMMENT : getOwnedComments().clear(); getOwnedComments().addAll( (Collection) newValue); return; case UMLPackage.MESSAGE_END__CLIENT_DEPENDENCY : getClientDependencies().clear(); getClientDependencies().addAll( (Collection) newValue); return; case UMLPackage.MESSAGE_END__NAME : setName((String) newValue); return; case UMLPackage.MESSAGE_END__NAME_EXPRESSION : setNameExpression((StringExpression) newValue); return; case UMLPackage.MESSAGE_END__VISIBILITY : setVisibility((VisibilityKind) newValue); return; case UMLPackage.MESSAGE_END__MESSAGE : setMessage((Message) newValue); return; } eDynamicSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case UMLPackage.MESSAGE_END__EANNOTATIONS : getEAnnotations().clear(); return; case UMLPackage.MESSAGE_END__OWNED_COMMENT : getOwnedComments().clear(); return; case UMLPackage.MESSAGE_END__CLIENT_DEPENDENCY : getClientDependencies().clear(); return; case UMLPackage.MESSAGE_END__NAME : unsetName(); return; case UMLPackage.MESSAGE_END__NAME_EXPRESSION : setNameExpression((StringExpression) null); return; case UMLPackage.MESSAGE_END__VISIBILITY : unsetVisibility(); return; case UMLPackage.MESSAGE_END__MESSAGE : setMessage((Message) null); return; } eDynamicUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case UMLPackage.MESSAGE_END__EANNOTATIONS : return eAnnotations != null && !eAnnotations.isEmpty(); case UMLPackage.MESSAGE_END__OWNED_COMMENT : return ownedComments != null && !ownedComments.isEmpty(); case UMLPackage.MESSAGE_END__OWNED_ELEMENT : return isSetOwnedElements(); case UMLPackage.MESSAGE_END__OWNER : return isSetOwner(); case UMLPackage.MESSAGE_END__CLIENT_DEPENDENCY : return clientDependencies != null && !clientDependencies.isEmpty(); case UMLPackage.MESSAGE_END__NAME : return isSetName(); case UMLPackage.MESSAGE_END__NAME_EXPRESSION : return nameExpression != null; case UMLPackage.MESSAGE_END__NAMESPACE : return isSetNamespace(); case UMLPackage.MESSAGE_END__QUALIFIED_NAME : return QUALIFIED_NAME_EDEFAULT == null ? getQualifiedName() != null : !QUALIFIED_NAME_EDEFAULT.equals(getQualifiedName()); case UMLPackage.MESSAGE_END__VISIBILITY : return isSetVisibility(); case UMLPackage.MESSAGE_END__MESSAGE : return message != null; } return eDynamicIsSet(featureID); } } //MessageEndImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy