blob: 2eb7e0d61edfab97e0d1a8b478cffe4f636d1189 [file] [log] [blame]
/**
* <copyright>
*
* Copyright (c) 2013, 2019 Willink Transformations 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
*
* </copyright>
*/
package org.eclipse.qvtd.pivot.qvtimperative.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.internal.VariableDeclarationImpl;
import org.eclipse.qvtd.pivot.qvtimperative.ConnectionVariable;
import org.eclipse.qvtd.pivot.qvtimperative.QVTimperativePackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Connection Variable</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.qvtd.pivot.qvtimperative.impl.ConnectionVariableImpl#isIsStrict <em>Is Strict</em>}</li>
* </ul>
*
* @generated
*/
public abstract class ConnectionVariableImpl extends VariableDeclarationImpl implements ConnectionVariable {
/**
* The number of structural features of the '<em>Connection Variable</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
public static final int CONNECTION_VARIABLE_FEATURE_COUNT = VariableDeclarationImpl.VARIABLE_DECLARATION_FEATURE_COUNT + 1;
/**
* The number of operations of the '<em>Connection Variable</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
public static final int CONNECTION_VARIABLE_OPERATION_COUNT = VariableDeclarationImpl.VARIABLE_DECLARATION_OPERATION_COUNT + 0;
/**
* The default value of the '{@link #isIsStrict() <em>Is Strict</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isIsStrict()
* @generated
* @ordered
*/
protected static final boolean IS_STRICT_EDEFAULT = false;
/**
* The cached value of the '{@link #isIsStrict() <em>Is Strict</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isIsStrict()
* @generated
* @ordered
*/
protected boolean isStrict = IS_STRICT_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ConnectionVariableImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return QVTimperativePackage.Literals.CONNECTION_VARIABLE;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean isIsStrict() {
return isStrict;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setIsStrict(boolean newIsStrict) {
boolean oldIsStrict = isStrict;
isStrict = newIsStrict;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, VariableDeclarationImpl.VARIABLE_DECLARATION_FEATURE_COUNT + 0, oldIsStrict, isStrict));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
@Override
public String toString() {
return super.toString();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case VariableDeclarationImpl.VARIABLE_DECLARATION_FEATURE_COUNT + 0:
return isIsStrict();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case VariableDeclarationImpl.VARIABLE_DECLARATION_FEATURE_COUNT + 0:
setIsStrict((Boolean)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case VariableDeclarationImpl.VARIABLE_DECLARATION_FEATURE_COUNT + 0:
setIsStrict(IS_STRICT_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case VariableDeclarationImpl.VARIABLE_DECLARATION_FEATURE_COUNT + 0:
return isStrict != IS_STRICT_EDEFAULT;
}
return super.eIsSet(featureID);
}
} //ConnectionVariableImpl