/** */ package de.ugoe.cs.swe.bnftools.ebnf.impl; import de.ugoe.cs.swe.bnftools.ebnf.EbnfPackage; import de.ugoe.cs.swe.bnftools.ebnf.StringRule; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; /** * * An implementation of the model object 'String Rule'. * *

* The following features are implemented: *

*

* * @generated */ public class StringRuleImpl extends MinimalEObjectImpl.Container implements StringRule { /** * The default value of the '{@link #getLiteral() Literal}' attribute. * * * @see #getLiteral() * @generated * @ordered */ protected static final String LITERAL_EDEFAULT = null; /** * The cached value of the '{@link #getLiteral() Literal}' attribute. * * * @see #getLiteral() * @generated * @ordered */ protected String literal = LITERAL_EDEFAULT; /** * The default value of the '{@link #getColon() Colon}' attribute. * * * @see #getColon() * @generated * @ordered */ protected static final String COLON_EDEFAULT = null; /** * The cached value of the '{@link #getColon() Colon}' attribute. * * * @see #getColon() * @generated * @ordered */ protected String colon = COLON_EDEFAULT; /** * * * @generated */ protected StringRuleImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return EbnfPackage.Literals.STRING_RULE; } /** * * * @generated */ public String getLiteral() { return literal; } /** * * * @generated */ public void setLiteral(String newLiteral) { String oldLiteral = literal; literal = newLiteral; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, EbnfPackage.STRING_RULE__LITERAL, oldLiteral, literal)); } /** * * * @generated */ public String getColon() { return colon; } /** * * * @generated */ public void setColon(String newColon) { String oldColon = colon; colon = newColon; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, EbnfPackage.STRING_RULE__COLON, oldColon, colon)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case EbnfPackage.STRING_RULE__LITERAL: return getLiteral(); case EbnfPackage.STRING_RULE__COLON: return getColon(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case EbnfPackage.STRING_RULE__LITERAL: setLiteral((String)newValue); return; case EbnfPackage.STRING_RULE__COLON: setColon((String)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case EbnfPackage.STRING_RULE__LITERAL: setLiteral(LITERAL_EDEFAULT); return; case EbnfPackage.STRING_RULE__COLON: setColon(COLON_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case EbnfPackage.STRING_RULE__LITERAL: return LITERAL_EDEFAULT == null ? literal != null : !LITERAL_EDEFAULT.equals(literal); case EbnfPackage.STRING_RULE__COLON: return COLON_EDEFAULT == null ? colon != null : !COLON_EDEFAULT.equals(colon); } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (literal: "); result.append(literal); result.append(", colon: "); result.append(colon); result.append(')'); return result.toString(); } } //StringRuleImpl