blob: 82f667a682394f934c6fa42d2034454ab0d87d9c [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2018 Willink Transformations 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:
* Adolfo Sanchez-Barbudo Herrera - initial API and implementation
*******************************************************************************/
/**
* generated by Xtext 2.10.0
*/
package org.eclipse.qvtd.doc.minioclcs.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.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.qvtd.doc.minioclcs.ExpCS;
import org.eclipse.qvtd.doc.minioclcs.MinioclcsPackage;
import org.eclipse.qvtd.doc.minioclcs.RoundedBracketClauseCS;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Rounded Bracket Clause CS</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.qvtd.doc.minioclcs.impl.RoundedBracketClauseCSImpl#getArgs <em>Args</em>}</li>
* </ul>
*
* @generated
*/
public class RoundedBracketClauseCSImpl extends CSTraceImpl implements RoundedBracketClauseCS
{
/**
* The cached value of the '{@link #getArgs() <em>Args</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getArgs()
* @generated
* @ordered
*/
protected EList<ExpCS> args;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected RoundedBracketClauseCSImpl()
{
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass()
{
return MinioclcsPackage.Literals.ROUNDED_BRACKET_CLAUSE_CS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<ExpCS> getArgs()
{
if (args == null) {
args = new EObjectContainmentEList<ExpCS>(ExpCS.class, this, MinioclcsPackage.ROUNDED_BRACKET_CLAUSE_CS__ARGS);
}
return args;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
{
switch (featureID) {
case MinioclcsPackage.ROUNDED_BRACKET_CLAUSE_CS__ARGS:
return ((InternalEList<?>)getArgs()).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 MinioclcsPackage.ROUNDED_BRACKET_CLAUSE_CS__ARGS:
return getArgs();
}
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 MinioclcsPackage.ROUNDED_BRACKET_CLAUSE_CS__ARGS:
getArgs().clear();
getArgs().addAll((Collection<? extends ExpCS>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID) {
case MinioclcsPackage.ROUNDED_BRACKET_CLAUSE_CS__ARGS:
getArgs().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID) {
case MinioclcsPackage.ROUNDED_BRACKET_CLAUSE_CS__ARGS:
return args != null && !args.isEmpty();
}
return super.eIsSet(featureID);
}
} //RoundedBracketClauseCSImpl