blob: 6b69dfc31ac1e0f787648bc542edf84a80dbf8f8 [file] [log] [blame]
/**
* <copyright>
* Copyright (c) 2013 Willink Transformations, University of York, and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v20.html
*
* Contributors:
* E.D.Willink - Initial API and implementation
* Adolfo Sanchez-Barbudo (University of York) - Bug397429
* </copyright>
*/
package org.eclipse.qvto.examples.pivot.qvtoperational.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.ocl.pivot.util.Visitor;
import org.eclipse.qvto.examples.pivot.qvtoperational.Helper;
import org.eclipse.qvto.examples.pivot.qvtoperational.QVTOperationalPackage;
import org.eclipse.qvto.examples.pivot.qvtoperational.util.QVTOperationalVisitor;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Helper</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.qvto.examples.pivot.qvtoperational.impl.HelperImpl#isIsQuery <em>Is Query</em>}</li>
* </ul>
*
* @generated
*/
public class HelperImpl extends ImperativeOperationImpl implements Helper {
/**
* The default value of the '{@link #isIsQuery() <em>Is Query</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isIsQuery()
* @generated
* @ordered
*/
protected static final boolean IS_QUERY_EDEFAULT = false;
/**
* The cached value of the '{@link #isIsQuery() <em>Is Query</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isIsQuery()
* @generated
* @ordered
*/
protected boolean isQuery = IS_QUERY_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected HelperImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return QVTOperationalPackage.Literals.HELPER;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean isIsQuery() {
return isQuery;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setIsQuery(boolean newIsQuery) {
boolean oldIsQuery = isQuery;
isQuery = newIsQuery;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, QVTOperationalPackage.HELPER__IS_QUERY, oldIsQuery, isQuery));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case QVTOperationalPackage.HELPER__IS_QUERY:
return isIsQuery();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case QVTOperationalPackage.HELPER__IS_QUERY:
setIsQuery((Boolean)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case QVTOperationalPackage.HELPER__IS_QUERY:
setIsQuery(IS_QUERY_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case QVTOperationalPackage.HELPER__IS_QUERY:
return isQuery != IS_QUERY_EDEFAULT;
}
return super.eIsSet(featureID);
}
@Override
public String toString() {
return super.toString();
}
/**
* {@inheritDoc}
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public <R> R accept(Visitor<R> visitor) {
return (R) ((QVTOperationalVisitor<?>)visitor).visitHelper(this);
}
} //HelperImpl