| /** |
| */ |
| package org.polarsys.chess.xtext.flaDsl.impl; |
| |
| import java.util.Collection; |
| |
| import org.eclipse.emf.common.notify.NotificationChain; |
| |
| import org.eclipse.emf.common.util.EList; |
| |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.InternalEObject; |
| |
| import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; |
| |
| import org.eclipse.emf.ecore.util.EObjectContainmentEList; |
| import org.eclipse.emf.ecore.util.InternalEList; |
| |
| import org.polarsys.chess.xtext.flaDsl.Behaviour; |
| import org.polarsys.chess.xtext.flaDsl.Expression; |
| import org.polarsys.chess.xtext.flaDsl.FlaDslPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Behaviour</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.polarsys.chess.xtext.flaDsl.impl.BehaviourImpl#getRules <em>Rules</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class BehaviourImpl extends MinimalEObjectImpl.Container implements Behaviour |
| { |
| /** |
| * The cached value of the '{@link #getRules() <em>Rules</em>}' containment reference list. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getRules() |
| * @generated |
| * @ordered |
| */ |
| protected EList<Expression> rules; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected BehaviourImpl() |
| { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() |
| { |
| return FlaDslPackage.Literals.BEHAVIOUR; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EList<Expression> getRules() |
| { |
| if (rules == null) |
| { |
| rules = new EObjectContainmentEList<Expression>(Expression.class, this, FlaDslPackage.BEHAVIOUR__RULES); |
| } |
| return rules; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) |
| { |
| switch (featureID) |
| { |
| case FlaDslPackage.BEHAVIOUR__RULES: |
| return ((InternalEList<?>)getRules()).basicRemove(otherEnd, msgs); |
| } |
| return super.eInverseRemove(otherEnd, featureID, msgs); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) |
| { |
| switch (featureID) |
| { |
| case FlaDslPackage.BEHAVIOUR__RULES: |
| return getRules(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @SuppressWarnings("unchecked") |
| @Override |
| public void eSet(int featureID, Object newValue) |
| { |
| switch (featureID) |
| { |
| case FlaDslPackage.BEHAVIOUR__RULES: |
| getRules().clear(); |
| getRules().addAll((Collection<? extends Expression>)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) |
| { |
| switch (featureID) |
| { |
| case FlaDslPackage.BEHAVIOUR__RULES: |
| getRules().clear(); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) |
| { |
| switch (featureID) |
| { |
| case FlaDslPackage.BEHAVIOUR__RULES: |
| return rules != null && !rules.isEmpty(); |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //BehaviourImpl |