| /** |
| */ |
| package org.eclipse.qvtd.doc.miniocl.impl; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| |
| import org.eclipse.emf.ecore.EClass; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| |
| import org.eclipse.jdt.annotation.NonNull; |
| |
| import org.eclipse.qvtd.doc.miniocl.BooleanLiteralExp; |
| import org.eclipse.qvtd.doc.miniocl.MiniOCLPackage; |
| |
| import org.eclipse.qvtd.doc.miniocl.util.Visitor; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Boolean Literal Exp</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.qvtd.doc.miniocl.impl.BooleanLiteralExpImpl#isBooleanSymbol <em>Boolean Symbol</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class BooleanLiteralExpImpl extends PrimitiveLiteralExpImpl implements BooleanLiteralExp { |
| /** |
| * The default value of the '{@link #isBooleanSymbol() <em>Boolean Symbol</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isBooleanSymbol() |
| * @generated |
| * @ordered |
| */ |
| protected static final boolean BOOLEAN_SYMBOL_EDEFAULT = false; |
| |
| /** |
| * The cached value of the '{@link #isBooleanSymbol() <em>Boolean Symbol</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isBooleanSymbol() |
| * @generated |
| * @ordered |
| */ |
| protected boolean booleanSymbol = BOOLEAN_SYMBOL_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected BooleanLiteralExpImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return MiniOCLPackage.Literals.BOOLEAN_LITERAL_EXP; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isBooleanSymbol() { |
| return booleanSymbol; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setBooleanSymbol(boolean newBooleanSymbol) { |
| boolean oldBooleanSymbol = booleanSymbol; |
| booleanSymbol = newBooleanSymbol; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, MiniOCLPackage.BOOLEAN_LITERAL_EXP__BOOLEAN_SYMBOL, oldBooleanSymbol, booleanSymbol)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case MiniOCLPackage.BOOLEAN_LITERAL_EXP__BOOLEAN_SYMBOL: |
| return isBooleanSymbol(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case MiniOCLPackage.BOOLEAN_LITERAL_EXP__BOOLEAN_SYMBOL: |
| setBooleanSymbol((Boolean)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case MiniOCLPackage.BOOLEAN_LITERAL_EXP__BOOLEAN_SYMBOL: |
| setBooleanSymbol(BOOLEAN_SYMBOL_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case MiniOCLPackage.BOOLEAN_LITERAL_EXP__BOOLEAN_SYMBOL: |
| return booleanSymbol != BOOLEAN_SYMBOL_EDEFAULT; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public String toString() { |
| if (eIsProxy()) return super.toString(); |
| |
| StringBuffer result = new StringBuffer(super.toString()); |
| result.append(" (booleanSymbol: "); |
| result.append(booleanSymbol); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| /** |
| * {@inheritDoc} |
| * @generated |
| */ |
| @Override |
| public <R> R accept(@NonNull Visitor<R> visitor) { |
| return visitor.visitBooleanLiteralExp(this); |
| } |
| |
| } //BooleanLiteralExpImpl |