From 419e76265ecbdf65e960e0624be006d31ed1e191 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Fri, 8 May 2020 18:28:19 +0200 Subject: Update solver language grammar First version, still needs TokenSource and Linker to work. --- .../impl/BoundedMultiplicityImpl.java | 237 +++++++++++++++++++++ 1 file changed, 237 insertions(+) create mode 100644 Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/BoundedMultiplicityImpl.java (limited to 'Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/BoundedMultiplicityImpl.java') diff --git a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/BoundedMultiplicityImpl.java b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/BoundedMultiplicityImpl.java new file mode 100644 index 00000000..45a105e0 --- /dev/null +++ b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/BoundedMultiplicityImpl.java @@ -0,0 +1,237 @@ +/** + * generated by Xtext 2.21.0 + */ +package org.eclipse.viatra.solver.language.solverLanguage.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.viatra.solver.language.solverLanguage.BoundedMultiplicity; +import org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage; + +/** + * + * An implementation of the model object 'Bounded Multiplicity'. + * + *

+ * The following features are implemented: + *

+ * + * + * @generated + */ +public class BoundedMultiplicityImpl extends MultiplicityImpl implements BoundedMultiplicity +{ + /** + * The default value of the '{@link #getLowerBound() Lower Bound}' attribute. + * + * + * @see #getLowerBound() + * @generated + * @ordered + */ + protected static final int LOWER_BOUND_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getLowerBound() Lower Bound}' attribute. + * + * + * @see #getLowerBound() + * @generated + * @ordered + */ + protected int lowerBound = LOWER_BOUND_EDEFAULT; + + /** + * The default value of the '{@link #getUpperBound() Upper Bound}' attribute. + * + * + * @see #getUpperBound() + * @generated + * @ordered + */ + protected static final int UPPER_BOUND_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getUpperBound() Upper Bound}' attribute. + * + * + * @see #getUpperBound() + * @generated + * @ordered + */ + protected int upperBound = UPPER_BOUND_EDEFAULT; + + /** + * + * + * @generated + */ + protected BoundedMultiplicityImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return SolverLanguagePackage.Literals.BOUNDED_MULTIPLICITY; + } + + /** + * + * + * @generated + */ + @Override + public int getLowerBound() + { + return lowerBound; + } + + /** + * + * + * @generated + */ + @Override + public void setLowerBound(int newLowerBound) + { + int oldLowerBound = lowerBound; + lowerBound = newLowerBound; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.BOUNDED_MULTIPLICITY__LOWER_BOUND, oldLowerBound, lowerBound)); + } + + /** + * + * + * @generated + */ + @Override + public int getUpperBound() + { + return upperBound; + } + + /** + * + * + * @generated + */ + @Override + public void setUpperBound(int newUpperBound) + { + int oldUpperBound = upperBound; + upperBound = newUpperBound; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.BOUNDED_MULTIPLICITY__UPPER_BOUND, oldUpperBound, upperBound)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case SolverLanguagePackage.BOUNDED_MULTIPLICITY__LOWER_BOUND: + return getLowerBound(); + case SolverLanguagePackage.BOUNDED_MULTIPLICITY__UPPER_BOUND: + return getUpperBound(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case SolverLanguagePackage.BOUNDED_MULTIPLICITY__LOWER_BOUND: + setLowerBound((Integer)newValue); + return; + case SolverLanguagePackage.BOUNDED_MULTIPLICITY__UPPER_BOUND: + setUpperBound((Integer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case SolverLanguagePackage.BOUNDED_MULTIPLICITY__LOWER_BOUND: + setLowerBound(LOWER_BOUND_EDEFAULT); + return; + case SolverLanguagePackage.BOUNDED_MULTIPLICITY__UPPER_BOUND: + setUpperBound(UPPER_BOUND_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case SolverLanguagePackage.BOUNDED_MULTIPLICITY__LOWER_BOUND: + return lowerBound != LOWER_BOUND_EDEFAULT; + case SolverLanguagePackage.BOUNDED_MULTIPLICITY__UPPER_BOUND: + return upperBound != UPPER_BOUND_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (lowerBound: "); + result.append(lowerBound); + result.append(", upperBound: "); + result.append(upperBound); + result.append(')'); + return result.toString(); + } + +} //BoundedMultiplicityImpl -- cgit v1.2.3-70-g09d2