Skip to content
Snippets Groups Projects
Commit 859739c0 authored by Alexander Diewald's avatar Alexander Diewald
Browse files

- Delete content of generated-src (committed by accident).

- Set svn:ignore property for generated-src.
parent fc166bba
No related branches found
No related tags found
No related merge requests found
Showing
with 0 additions and 3071 deletions
/**
*/
package org.fortiss.af3.exploration.dsl.model;
import org.eclipse.emf.ecore.EObject;
import org.fortiss.af3.exploration.dsl.model.expressions.Expression;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>MOEA Exploration Expression</b></em>'.
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
* DEPRECATED/LEGACY.
* <!-- end-model-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.fortiss.af3.exploration.dsl.model.MOEAExplorationExpression#getExpression <em>Expression</em>}</li>
* </ul>
* </p>
*
* @see org.fortiss.af3.exploration.dsl.model.ModelPackage#getMOEAExplorationExpression()
* @model interface="true" abstract="true"
* @generated
*/
public interface MOEAExplorationExpression extends EObject {
/**
* Returns the value of the '<em><b>Expression</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* DEPRECATED/LEGACY.
* <!-- end-model-doc -->
* @return the value of the '<em>Expression</em>' containment reference.
* @see #setExpression(Expression)
* @see org.fortiss.af3.exploration.dsl.model.ModelPackage#getMOEAExplorationExpression_Expression()
* @model containment="true" resolveProxies="true"
* @generated
*/
Expression getExpression();
/**
* Sets the value of the '{@link org.fortiss.af3.exploration.dsl.model.MOEAExplorationExpression#getExpression <em>Expression</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Expression</em>' containment reference.
* @see #getExpression()
* @generated
*/
void setExpression(Expression value);
} // MOEAExplorationExpression
/**
*/
package org.fortiss.af3.exploration.dsl.model;
import org.eclipse.emf.ecore.EFactory;
/**
* <!-- begin-user-doc -->
* The <b>Factory</b> for the model.
* It provides a create method for each non-abstract class of the model.
* <!-- end-user-doc -->
* @see org.fortiss.af3.exploration.dsl.model.ModelPackage
* @generated
*/
public interface ModelFactory extends EFactory {
/**
* The singleton instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
ModelFactory eINSTANCE = org.fortiss.af3.exploration.dsl.model.impl.ModelFactoryImpl.init();
/**
* Returns the package supported by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the package supported by this factory.
* @generated
*/
ModelPackage getModelPackage();
} //ModelFactory
/**
*/
package org.fortiss.af3.exploration.dsl.model;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
/**
* <!-- begin-user-doc -->
* The <b>Package</b> for the model.
* It contains accessors for the meta objects to represent
* <ul>
* <li>each class,</li>
* <li>each feature of each class,</li>
* <li>each enum,</li>
* <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
* @see org.fortiss.af3.exploration.dsl.model.ModelFactory
* @model kind="package"
* @generated
*/
public interface ModelPackage extends EPackage {
/**
* The package name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
String eNAME = "model";
/**
* The package namespace URI.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
String eNS_URI = "http://www.fortiss.org/af3/explorationdsl";
/**
* The package namespace name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
String eNS_PREFIX = "org-fortiss-af3-explorationdsl";
/**
* The singleton instance of the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
ModelPackage eINSTANCE = org.fortiss.af3.exploration.dsl.model.impl.ModelPackageImpl.init();
/**
* The meta object id for the '{@link org.fortiss.af3.exploration.dsl.model.MOEAExplorationExpression <em>MOEA Exploration Expression</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.fortiss.af3.exploration.dsl.model.MOEAExplorationExpression
* @see org.fortiss.af3.exploration.dsl.model.impl.ModelPackageImpl#getMOEAExplorationExpression()
* @generated
*/
int MOEA_EXPLORATION_EXPRESSION = 0;
/**
* The feature id for the '<em><b>Expression</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int MOEA_EXPLORATION_EXPRESSION__EXPRESSION = 0;
/**
* The number of structural features of the '<em>MOEA Exploration Expression</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int MOEA_EXPLORATION_EXPRESSION_FEATURE_COUNT = 1;
/**
* Returns the meta object for class '{@link org.fortiss.af3.exploration.dsl.model.MOEAExplorationExpression <em>MOEA Exploration Expression</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>MOEA Exploration Expression</em>'.
* @see org.fortiss.af3.exploration.dsl.model.MOEAExplorationExpression
* @generated
*/
EClass getMOEAExplorationExpression();
/**
* Returns the meta object for the containment reference '{@link org.fortiss.af3.exploration.dsl.model.MOEAExplorationExpression#getExpression <em>Expression</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Expression</em>'.
* @see org.fortiss.af3.exploration.dsl.model.MOEAExplorationExpression#getExpression()
* @see #getMOEAExplorationExpression()
* @generated
*/
EReference getMOEAExplorationExpression_Expression();
/**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the factory that creates the instances of the model.
* @generated
*/
ModelFactory getModelFactory();
/**
* <!-- begin-user-doc -->
* Defines literals for the meta objects that represent
* <ul>
* <li>each class,</li>
* <li>each feature of each class,</li>
* <li>each enum,</li>
* <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
* @generated
*/
interface Literals {
/**
* The meta object literal for the '{@link org.fortiss.af3.exploration.dsl.model.MOEAExplorationExpression <em>MOEA Exploration Expression</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.fortiss.af3.exploration.dsl.model.MOEAExplorationExpression
* @see org.fortiss.af3.exploration.dsl.model.impl.ModelPackageImpl#getMOEAExplorationExpression()
* @generated
*/
EClass MOEA_EXPLORATION_EXPRESSION = eINSTANCE.getMOEAExplorationExpression();
/**
* The meta object literal for the '<em><b>Expression</b></em>' containment reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference MOEA_EXPLORATION_EXPRESSION__EXPRESSION = eINSTANCE.getMOEAExplorationExpression_Expression();
}
} //ModelPackage
/**
*/
package org.fortiss.af3.exploration.dsl.model.expressions;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Arithmetic Expression</b></em>'.
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
* DEPRECATED/LEGACY.
* <!-- end-model-doc -->
*
*
* @see org.fortiss.af3.exploration.dsl.model.expressions.ExpressionsPackage#getArithmeticExpression()
* @model interface="true" abstract="true"
* @generated
*/
public interface ArithmeticExpression<T> extends Expression {
} // ArithmeticExpression
/**
*/
package org.fortiss.af3.exploration.dsl.model.expressions;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Boolean Expression</b></em>'.
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
* DEPRECATED/LEGACY.
* <!-- end-model-doc -->
*
*
* @see org.fortiss.af3.exploration.dsl.model.expressions.ExpressionsPackage#getBooleanExpression()
* @model interface="true" abstract="true"
* @generated
*/
public interface BooleanExpression extends Expression {
} // BooleanExpression
/**
*/
package org.fortiss.af3.exploration.dsl.model.expressions;
import org.eclipse.emf.common.util.EList;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Constraint Expression</b></em>'.
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
* DEPRECATED/LEGACY.
* <!-- end-model-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.fortiss.af3.exploration.dsl.model.expressions.ConstraintExpression#getPrefix <em>Prefix</em>}</li>
* <li>{@link org.fortiss.af3.exploration.dsl.model.expressions.ConstraintExpression#getPredicate <em>Predicate</em>}</li>
* <li>{@link org.fortiss.af3.exploration.dsl.model.expressions.ConstraintExpression#getExpression <em>Expression</em>}</li>
* </ul>
* </p>
*
* @see org.fortiss.af3.exploration.dsl.model.expressions.ExpressionsPackage#getConstraintExpression()
* @model
* @generated
*/
public interface ConstraintExpression<T extends BooleanExpression> extends Expression {
/**
* Returns the value of the '<em><b>Prefix</b></em>' containment reference list.
* The list contents are of type {@link org.fortiss.af3.exploration.dsl.model.expressions.PrefixExpression}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* DEPRECATED/LEGACY.
* <!-- end-model-doc -->
* @return the value of the '<em>Prefix</em>' containment reference list.
* @see org.fortiss.af3.exploration.dsl.model.expressions.ExpressionsPackage#getConstraintExpression_Prefix()
* @model containment="true" resolveProxies="true" required="true"
* @generated
*/
EList<PrefixExpression> getPrefix();
/**
* Returns the value of the '<em><b>Predicate</b></em>' containment reference list.
* The list contents are of type {@link org.fortiss.af3.exploration.dsl.model.expressions.BooleanExpression}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* DEPRECATED/LEGACY.
* <!-- end-model-doc -->
* @return the value of the '<em>Predicate</em>' containment reference list.
* @see org.fortiss.af3.exploration.dsl.model.expressions.ExpressionsPackage#getConstraintExpression_Predicate()
* @model containment="true" resolveProxies="true"
* @generated
*/
EList<BooleanExpression> getPredicate();
/**
* Returns the value of the '<em><b>Expression</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* DEPRECATED/LEGACY.
* <!-- end-model-doc -->
* @return the value of the '<em>Expression</em>' containment reference.
* @see #setExpression(BooleanExpression)
* @see org.fortiss.af3.exploration.dsl.model.expressions.ExpressionsPackage#getConstraintExpression_Expression()
* @model containment="true" resolveProxies="true" required="true"
* @generated
*/
T getExpression();
/**
* Sets the value of the '{@link org.fortiss.af3.exploration.dsl.model.expressions.ConstraintExpression#getExpression <em>Expression</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Expression</em>' containment reference.
* @see #getExpression()
* @generated
*/
void setExpression(T value);
} // ConstraintExpression
/**
*/
package org.fortiss.af3.exploration.dsl.model.expressions;
import org.fortiss.tooling.base.model.element.IModelElement;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Element Expression</b></em>'.
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
* DEPRECATED/LEGACY.
* <!-- end-model-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.fortiss.af3.exploration.dsl.model.expressions.ElementExpression#getModelElement <em>Model Element</em>}</li>
* </ul>
* </p>
*
* @see org.fortiss.af3.exploration.dsl.model.expressions.ExpressionsPackage#getElementExpression()
* @model
* @generated
*/
public interface ElementExpression<ME extends IModelElement> extends Expression {
/**
* Returns the value of the '<em><b>Model Element</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* DEPRECATED/LEGACY.
* <!-- end-model-doc -->
* @return the value of the '<em>Model Element</em>' reference.
* @see #setModelElement(IModelElement)
* @see org.fortiss.af3.exploration.dsl.model.expressions.ExpressionsPackage#getElementExpression_ModelElement()
* @model
* @generated
*/
ME getModelElement();
/**
* Sets the value of the '{@link org.fortiss.af3.exploration.dsl.model.expressions.ElementExpression#getModelElement <em>Model Element</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Model Element</em>' reference.
* @see #getModelElement()
* @generated
*/
void setModelElement(ME value);
} // ElementExpression
/**
*/
package org.fortiss.af3.exploration.dsl.model.expressions;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Expression</b></em>'.
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
* DEPRECATED/LEGACY.
* <!-- end-model-doc -->
*
*
* @see org.fortiss.af3.exploration.dsl.model.expressions.ExpressionsPackage#getExpression()
* @model interface="true" abstract="true"
* @generated
*/
public interface Expression extends EObject {
} // Expression
/**
*/
package org.fortiss.af3.exploration.dsl.model.expressions;
import org.eclipse.emf.ecore.EFactory;
import org.fortiss.tooling.base.model.element.IModelElement;
/**
* <!-- begin-user-doc -->
* The <b>Factory</b> for the model.
* It provides a create method for each non-abstract class of the model.
* <!-- end-user-doc -->
* @see org.fortiss.af3.exploration.dsl.model.expressions.ExpressionsPackage
* @generated
*/
public interface ExpressionsFactory extends EFactory {
/**
* The singleton instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
ExpressionsFactory eINSTANCE = org.fortiss.af3.exploration.dsl.model.expressions.impl.ExpressionsFactoryImpl.init();
/**
* Returns a new object of class '<em>Objective Expression</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Objective Expression</em>'.
* @generated
*/
ObjectiveExpression createObjectiveExpression();
/**
* Returns a new object of class '<em>Constraint Expression</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Constraint Expression</em>'.
* @generated
*/
<T extends BooleanExpression> ConstraintExpression<T> createConstraintExpression();
/**
* Returns a new object of class '<em>Element Expression</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Element Expression</em>'.
* @generated
*/
<ME extends IModelElement> ElementExpression<ME> createElementExpression();
/**
* Returns the package supported by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the package supported by this factory.
* @generated
*/
ExpressionsPackage getExpressionsPackage();
} //ExpressionsFactory
/**
*/
package org.fortiss.af3.exploration.dsl.model.expressions;
import org.fortiss.af3.exploration.dsl.model.operators.OptimizationDirection;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Objective Expression</b></em>'.
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
* DEPRECATED/LEGACY.
* <!-- end-model-doc -->
*
*
* @see org.fortiss.af3.exploration.dsl.model.expressions.ExpressionsPackage#getObjectiveExpression()
* @model
* @generated
*/
public interface ObjectiveExpression extends Expression, OptimizationDirection {
} // ObjectiveExpression
/**
*/
package org.fortiss.af3.exploration.dsl.model.expressions;
import org.fortiss.af3.exploration.dsl.model.operators.QuantifierOp;
import org.fortiss.af3.exploration.dsl.model.types.SetType;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Prefix Expression</b></em>'.
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
* DEPRECATED/LEGACY.
* <!-- end-model-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.fortiss.af3.exploration.dsl.model.expressions.PrefixExpression#getQuantifier <em>Quantifier</em>}</li>
* <li>{@link org.fortiss.af3.exploration.dsl.model.expressions.PrefixExpression#getSet <em>Set</em>}</li>
* </ul>
* </p>
*
* @see org.fortiss.af3.exploration.dsl.model.expressions.ExpressionsPackage#getPrefixExpression()
* @model interface="true" abstract="true"
* @generated
*/
public interface PrefixExpression extends Expression {
/**
* Returns the value of the '<em><b>Quantifier</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* DEPRECATED/LEGACY.
* <!-- end-model-doc -->
* @return the value of the '<em>Quantifier</em>' containment reference.
* @see #setQuantifier(QuantifierOp)
* @see org.fortiss.af3.exploration.dsl.model.expressions.ExpressionsPackage#getPrefixExpression_Quantifier()
* @model containment="true" resolveProxies="true" required="true"
* @generated
*/
QuantifierOp getQuantifier();
/**
* Sets the value of the '{@link org.fortiss.af3.exploration.dsl.model.expressions.PrefixExpression#getQuantifier <em>Quantifier</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Quantifier</em>' containment reference.
* @see #getQuantifier()
* @generated
*/
void setQuantifier(QuantifierOp value);
/**
* Returns the value of the '<em><b>Set</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* DEPRECATED/LEGACY.
* <!-- end-model-doc -->
* @return the value of the '<em>Set</em>' containment reference.
* @see #setSet(SetType)
* @see org.fortiss.af3.exploration.dsl.model.expressions.ExpressionsPackage#getPrefixExpression_Set()
* @model containment="true" resolveProxies="true" required="true"
* @generated
*/
SetType<?> getSet();
/**
* Sets the value of the '{@link org.fortiss.af3.exploration.dsl.model.expressions.PrefixExpression#getSet <em>Set</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Set</em>' containment reference.
* @see #getSet()
* @generated
*/
void setSet(SetType<?> value);
} // PrefixExpression
/**
*/
package org.fortiss.af3.exploration.dsl.model.expressions.impl;
import java.util.Collection;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
import org.fortiss.af3.exploration.dsl.model.expressions.BooleanExpression;
import org.fortiss.af3.exploration.dsl.model.expressions.ConstraintExpression;
import org.fortiss.af3.exploration.dsl.model.expressions.ExpressionsPackage;
import org.fortiss.af3.exploration.dsl.model.expressions.PrefixExpression;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Constraint Expression</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.fortiss.af3.exploration.dsl.model.expressions.impl.ConstraintExpressionImpl#getPrefix <em>Prefix</em>}</li>
* <li>{@link org.fortiss.af3.exploration.dsl.model.expressions.impl.ConstraintExpressionImpl#getPredicate <em>Predicate</em>}</li>
* <li>{@link org.fortiss.af3.exploration.dsl.model.expressions.impl.ConstraintExpressionImpl#getExpression <em>Expression</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class ConstraintExpressionImpl<T extends BooleanExpression> extends EObjectImpl implements ConstraintExpression<T> {
/**
* The cached value of the '{@link #getPrefix() <em>Prefix</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getPrefix()
* @generated
* @ordered
*/
protected EList<PrefixExpression> prefix;
/**
* The cached value of the '{@link #getPredicate() <em>Predicate</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getPredicate()
* @generated
* @ordered
*/
protected EList<BooleanExpression> predicate;
/**
* The cached value of the '{@link #getExpression() <em>Expression</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getExpression()
* @generated
* @ordered
*/
protected T expression;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ConstraintExpressionImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return ExpressionsPackage.Literals.CONSTRAINT_EXPRESSION;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<PrefixExpression> getPrefix() {
if (prefix == null) {
prefix = new EObjectContainmentEList.Resolving<PrefixExpression>(PrefixExpression.class, this, ExpressionsPackage.CONSTRAINT_EXPRESSION__PREFIX);
}
return prefix;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<BooleanExpression> getPredicate() {
if (predicate == null) {
predicate = new EObjectContainmentEList.Resolving<BooleanExpression>(BooleanExpression.class, this, ExpressionsPackage.CONSTRAINT_EXPRESSION__PREDICATE);
}
return predicate;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
public T getExpression() {
if (expression != null && expression.eIsProxy()) {
InternalEObject oldExpression = (InternalEObject)expression;
expression = (T)eResolveProxy(oldExpression);
if (expression != oldExpression) {
InternalEObject newExpression = (InternalEObject)expression;
NotificationChain msgs = oldExpression.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ExpressionsPackage.CONSTRAINT_EXPRESSION__EXPRESSION, null, null);
if (newExpression.eInternalContainer() == null) {
msgs = newExpression.eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ExpressionsPackage.CONSTRAINT_EXPRESSION__EXPRESSION, null, msgs);
}
if (msgs != null) msgs.dispatch();
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ExpressionsPackage.CONSTRAINT_EXPRESSION__EXPRESSION, oldExpression, expression));
}
}
return expression;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public T basicGetExpression() {
return expression;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetExpression(T newExpression, NotificationChain msgs) {
T oldExpression = expression;
expression = newExpression;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ExpressionsPackage.CONSTRAINT_EXPRESSION__EXPRESSION, oldExpression, newExpression);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setExpression(T newExpression) {
if (newExpression != expression) {
NotificationChain msgs = null;
if (expression != null)
msgs = ((InternalEObject)expression).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ExpressionsPackage.CONSTRAINT_EXPRESSION__EXPRESSION, null, msgs);
if (newExpression != null)
msgs = ((InternalEObject)newExpression).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ExpressionsPackage.CONSTRAINT_EXPRESSION__EXPRESSION, null, msgs);
msgs = basicSetExpression(newExpression, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ExpressionsPackage.CONSTRAINT_EXPRESSION__EXPRESSION, newExpression, newExpression));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case ExpressionsPackage.CONSTRAINT_EXPRESSION__PREFIX:
return ((InternalEList<?>)getPrefix()).basicRemove(otherEnd, msgs);
case ExpressionsPackage.CONSTRAINT_EXPRESSION__PREDICATE:
return ((InternalEList<?>)getPredicate()).basicRemove(otherEnd, msgs);
case ExpressionsPackage.CONSTRAINT_EXPRESSION__EXPRESSION:
return basicSetExpression(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case ExpressionsPackage.CONSTRAINT_EXPRESSION__PREFIX:
return getPrefix();
case ExpressionsPackage.CONSTRAINT_EXPRESSION__PREDICATE:
return getPredicate();
case ExpressionsPackage.CONSTRAINT_EXPRESSION__EXPRESSION:
if (resolve) return getExpression();
return basicGetExpression();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case ExpressionsPackage.CONSTRAINT_EXPRESSION__PREFIX:
getPrefix().clear();
getPrefix().addAll((Collection<? extends PrefixExpression>)newValue);
return;
case ExpressionsPackage.CONSTRAINT_EXPRESSION__PREDICATE:
getPredicate().clear();
getPredicate().addAll((Collection<? extends BooleanExpression>)newValue);
return;
case ExpressionsPackage.CONSTRAINT_EXPRESSION__EXPRESSION:
setExpression((T)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case ExpressionsPackage.CONSTRAINT_EXPRESSION__PREFIX:
getPrefix().clear();
return;
case ExpressionsPackage.CONSTRAINT_EXPRESSION__PREDICATE:
getPredicate().clear();
return;
case ExpressionsPackage.CONSTRAINT_EXPRESSION__EXPRESSION:
setExpression((T)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case ExpressionsPackage.CONSTRAINT_EXPRESSION__PREFIX:
return prefix != null && !prefix.isEmpty();
case ExpressionsPackage.CONSTRAINT_EXPRESSION__PREDICATE:
return predicate != null && !predicate.isEmpty();
case ExpressionsPackage.CONSTRAINT_EXPRESSION__EXPRESSION:
return expression != null;
}
return super.eIsSet(featureID);
}
} //ConstraintExpressionImpl
/**
*/
package org.fortiss.af3.exploration.dsl.model.expressions.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
import org.fortiss.af3.exploration.dsl.model.expressions.ElementExpression;
import org.fortiss.af3.exploration.dsl.model.expressions.ExpressionsPackage;
import org.fortiss.tooling.base.model.element.IModelElement;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Element Expression</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.fortiss.af3.exploration.dsl.model.expressions.impl.ElementExpressionImpl#getModelElement <em>Model Element</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class ElementExpressionImpl<ME extends IModelElement> extends EObjectImpl implements ElementExpression<ME> {
/**
* The cached value of the '{@link #getModelElement() <em>Model Element</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getModelElement()
* @generated
* @ordered
*/
protected ME modelElement;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ElementExpressionImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return ExpressionsPackage.Literals.ELEMENT_EXPRESSION;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
public ME getModelElement() {
if (modelElement != null && modelElement.eIsProxy()) {
InternalEObject oldModelElement = (InternalEObject)modelElement;
modelElement = (ME)eResolveProxy(oldModelElement);
if (modelElement != oldModelElement) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ExpressionsPackage.ELEMENT_EXPRESSION__MODEL_ELEMENT, oldModelElement, modelElement));
}
}
return modelElement;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ME basicGetModelElement() {
return modelElement;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setModelElement(ME newModelElement) {
ME oldModelElement = modelElement;
modelElement = newModelElement;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ExpressionsPackage.ELEMENT_EXPRESSION__MODEL_ELEMENT, oldModelElement, modelElement));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case ExpressionsPackage.ELEMENT_EXPRESSION__MODEL_ELEMENT:
if (resolve) return getModelElement();
return basicGetModelElement();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case ExpressionsPackage.ELEMENT_EXPRESSION__MODEL_ELEMENT:
setModelElement((ME)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case ExpressionsPackage.ELEMENT_EXPRESSION__MODEL_ELEMENT:
setModelElement((ME)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case ExpressionsPackage.ELEMENT_EXPRESSION__MODEL_ELEMENT:
return modelElement != null;
}
return super.eIsSet(featureID);
}
} //ElementExpressionImpl
/**
*/
package org.fortiss.af3.exploration.dsl.model.expressions.impl;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
import org.fortiss.af3.exploration.dsl.model.expressions.*;
import org.fortiss.tooling.base.model.element.IModelElement;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
* @generated
*/
public class ExpressionsFactoryImpl extends EFactoryImpl implements ExpressionsFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static ExpressionsFactory init() {
try {
ExpressionsFactory theExpressionsFactory = (ExpressionsFactory)EPackage.Registry.INSTANCE.getEFactory(ExpressionsPackage.eNS_URI);
if (theExpressionsFactory != null) {
return theExpressionsFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new ExpressionsFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ExpressionsFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case ExpressionsPackage.OBJECTIVE_EXPRESSION: return createObjectiveExpression();
case ExpressionsPackage.CONSTRAINT_EXPRESSION: return createConstraintExpression();
case ExpressionsPackage.ELEMENT_EXPRESSION: return createElementExpression();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ObjectiveExpression createObjectiveExpression() {
ObjectiveExpressionImpl objectiveExpression = new ObjectiveExpressionImpl();
return objectiveExpression;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public <T extends BooleanExpression> ConstraintExpression<T> createConstraintExpression() {
ConstraintExpressionImpl<T> constraintExpression = new ConstraintExpressionImpl<T>();
return constraintExpression;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public <ME extends IModelElement> ElementExpression<ME> createElementExpression() {
ElementExpressionImpl<ME> elementExpression = new ElementExpressionImpl<ME>();
return elementExpression;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ExpressionsPackage getExpressionsPackage() {
return (ExpressionsPackage)getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static ExpressionsPackage getPackage() {
return ExpressionsPackage.eINSTANCE;
}
} //ExpressionsFactoryImpl
/**
*/
package org.fortiss.af3.exploration.dsl.model.expressions.impl;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EGenericType;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.ETypeParameter;
import org.eclipse.emf.ecore.impl.EPackageImpl;
import org.fortiss.af3.exploration.dsl.model.ModelPackage;
import org.fortiss.af3.exploration.dsl.model.expressions.ArithmeticExpression;
import org.fortiss.af3.exploration.dsl.model.expressions.BooleanExpression;
import org.fortiss.af3.exploration.dsl.model.expressions.ConstraintExpression;
import org.fortiss.af3.exploration.dsl.model.expressions.ElementExpression;
import org.fortiss.af3.exploration.dsl.model.expressions.Expression;
import org.fortiss.af3.exploration.dsl.model.expressions.ExpressionsFactory;
import org.fortiss.af3.exploration.dsl.model.expressions.ExpressionsPackage;
import org.fortiss.af3.exploration.dsl.model.expressions.ObjectiveExpression;
import org.fortiss.af3.exploration.dsl.model.expressions.PrefixExpression;
import org.fortiss.af3.exploration.dsl.model.impl.ModelPackageImpl;
import org.fortiss.af3.exploration.dsl.model.operators.OperatorsPackage;
import org.fortiss.af3.exploration.dsl.model.operators.impl.OperatorsPackageImpl;
import org.fortiss.af3.exploration.dsl.model.patterns.PatternsPackage;
import org.fortiss.af3.exploration.dsl.model.patterns.impl.PatternsPackageImpl;
import org.fortiss.af3.exploration.dsl.model.types.TypesPackage;
import org.fortiss.af3.exploration.dsl.model.types.impl.TypesPackageImpl;
import org.fortiss.tooling.base.model.base.BasePackage;
import org.fortiss.tooling.base.model.element.ElementPackage;
import org.fortiss.tooling.base.model.layout.LayoutPackage;
import org.fortiss.tooling.base.model.visualization.VisualizationPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Package</b>.
* <!-- end-user-doc -->
* @generated
*/
public class ExpressionsPackageImpl extends EPackageImpl implements ExpressionsPackage {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass expressionEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass objectiveExpressionEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass constraintExpressionEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass prefixExpressionEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass booleanExpressionEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass arithmeticExpressionEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass elementExpressionEClass = null;
/**
* Creates an instance of the model <b>Package</b>, registered with
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
* package URI value.
* <p>Note: the correct way to create the package is via the static
* factory method {@link #init init()}, which also performs
* initialization of the package, or returns the registered package,
* if one already exists.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.emf.ecore.EPackage.Registry
* @see org.fortiss.af3.exploration.dsl.model.expressions.ExpressionsPackage#eNS_URI
* @see #init()
* @generated
*/
private ExpressionsPackageImpl() {
super(eNS_URI, ExpressionsFactory.eINSTANCE);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static boolean isInited = false;
/**
* Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
*
* <p>This method is used to initialize {@link ExpressionsPackage#eINSTANCE} when that field is accessed.
* Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #eNS_URI
* @see #createPackageContents()
* @see #initializePackageContents()
* @generated
*/
public static ExpressionsPackage init() {
if (isInited) return (ExpressionsPackage)EPackage.Registry.INSTANCE.getEPackage(ExpressionsPackage.eNS_URI);
// Obtain or create and register package
ExpressionsPackageImpl theExpressionsPackage = (ExpressionsPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ExpressionsPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ExpressionsPackageImpl());
isInited = true;
// Initialize simple dependencies
ElementPackage.eINSTANCE.eClass();
LayoutPackage.eINSTANCE.eClass();
BasePackage.eINSTANCE.eClass();
VisualizationPackage.eINSTANCE.eClass();
// Obtain or create and register interdependencies
ModelPackageImpl theModelPackage = (ModelPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ModelPackage.eNS_URI) instanceof ModelPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ModelPackage.eNS_URI) : ModelPackage.eINSTANCE);
OperatorsPackageImpl theOperatorsPackage = (OperatorsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(OperatorsPackage.eNS_URI) instanceof OperatorsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(OperatorsPackage.eNS_URI) : OperatorsPackage.eINSTANCE);
PatternsPackageImpl thePatternsPackage = (PatternsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(PatternsPackage.eNS_URI) instanceof PatternsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(PatternsPackage.eNS_URI) : PatternsPackage.eINSTANCE);
TypesPackageImpl theTypesPackage = (TypesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TypesPackage.eNS_URI) instanceof TypesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(TypesPackage.eNS_URI) : TypesPackage.eINSTANCE);
// Create package meta-data objects
theExpressionsPackage.createPackageContents();
theModelPackage.createPackageContents();
theOperatorsPackage.createPackageContents();
thePatternsPackage.createPackageContents();
theTypesPackage.createPackageContents();
// Initialize created meta-data
theExpressionsPackage.initializePackageContents();
theModelPackage.initializePackageContents();
theOperatorsPackage.initializePackageContents();
thePatternsPackage.initializePackageContents();
theTypesPackage.initializePackageContents();
// Mark meta-data to indicate it can't be changed
theExpressionsPackage.freeze();
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(ExpressionsPackage.eNS_URI, theExpressionsPackage);
return theExpressionsPackage;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getExpression() {
return expressionEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getObjectiveExpression() {
return objectiveExpressionEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getConstraintExpression() {
return constraintExpressionEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getConstraintExpression_Prefix() {
return (EReference)constraintExpressionEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getConstraintExpression_Predicate() {
return (EReference)constraintExpressionEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getConstraintExpression_Expression() {
return (EReference)constraintExpressionEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getPrefixExpression() {
return prefixExpressionEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getPrefixExpression_Quantifier() {
return (EReference)prefixExpressionEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getPrefixExpression_Set() {
return (EReference)prefixExpressionEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getBooleanExpression() {
return booleanExpressionEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getArithmeticExpression() {
return arithmeticExpressionEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getElementExpression() {
return elementExpressionEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getElementExpression_ModelElement() {
return (EReference)elementExpressionEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ExpressionsFactory getExpressionsFactory() {
return (ExpressionsFactory)getEFactoryInstance();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private boolean isCreated = false;
/**
* Creates the meta-model objects for the package. This method is
* guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void createPackageContents() {
if (isCreated) return;
isCreated = true;
// Create classes and their features
expressionEClass = createEClass(EXPRESSION);
objectiveExpressionEClass = createEClass(OBJECTIVE_EXPRESSION);
constraintExpressionEClass = createEClass(CONSTRAINT_EXPRESSION);
createEReference(constraintExpressionEClass, CONSTRAINT_EXPRESSION__PREFIX);
createEReference(constraintExpressionEClass, CONSTRAINT_EXPRESSION__PREDICATE);
createEReference(constraintExpressionEClass, CONSTRAINT_EXPRESSION__EXPRESSION);
prefixExpressionEClass = createEClass(PREFIX_EXPRESSION);
createEReference(prefixExpressionEClass, PREFIX_EXPRESSION__QUANTIFIER);
createEReference(prefixExpressionEClass, PREFIX_EXPRESSION__SET);
booleanExpressionEClass = createEClass(BOOLEAN_EXPRESSION);
arithmeticExpressionEClass = createEClass(ARITHMETIC_EXPRESSION);
elementExpressionEClass = createEClass(ELEMENT_EXPRESSION);
createEReference(elementExpressionEClass, ELEMENT_EXPRESSION__MODEL_ELEMENT);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private boolean isInitialized = false;
/**
* Complete the initialization of the package and its meta-model. This
* method is guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void initializePackageContents() {
if (isInitialized) return;
isInitialized = true;
// Initialize package
setName(eNAME);
setNsPrefix(eNS_PREFIX);
setNsURI(eNS_URI);
// Obtain other dependent packages
OperatorsPackage theOperatorsPackage = (OperatorsPackage)EPackage.Registry.INSTANCE.getEPackage(OperatorsPackage.eNS_URI);
TypesPackage theTypesPackage = (TypesPackage)EPackage.Registry.INSTANCE.getEPackage(TypesPackage.eNS_URI);
ElementPackage theElementPackage = (ElementPackage)EPackage.Registry.INSTANCE.getEPackage(ElementPackage.eNS_URI);
// Create type parameters
ETypeParameter constraintExpressionEClass_T = addETypeParameter(constraintExpressionEClass, "T");
addETypeParameter(arithmeticExpressionEClass, "T");
ETypeParameter elementExpressionEClass_ME = addETypeParameter(elementExpressionEClass, "ME");
// Set bounds for type parameters
EGenericType g1 = createEGenericType(this.getBooleanExpression());
constraintExpressionEClass_T.getEBounds().add(g1);
g1 = createEGenericType(theElementPackage.getIModelElement());
elementExpressionEClass_ME.getEBounds().add(g1);
// Add supertypes to classes
objectiveExpressionEClass.getESuperTypes().add(this.getExpression());
objectiveExpressionEClass.getESuperTypes().add(theOperatorsPackage.getOptimizationDirection());
constraintExpressionEClass.getESuperTypes().add(this.getExpression());
prefixExpressionEClass.getESuperTypes().add(this.getExpression());
booleanExpressionEClass.getESuperTypes().add(this.getExpression());
arithmeticExpressionEClass.getESuperTypes().add(this.getExpression());
elementExpressionEClass.getESuperTypes().add(this.getExpression());
// Initialize classes and features; add operations and parameters
initEClass(expressionEClass, Expression.class, "Expression", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(objectiveExpressionEClass, ObjectiveExpression.class, "ObjectiveExpression", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(constraintExpressionEClass, ConstraintExpression.class, "ConstraintExpression", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getConstraintExpression_Prefix(), this.getPrefixExpression(), null, "prefix", null, 1, -1, ConstraintExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getConstraintExpression_Predicate(), this.getBooleanExpression(), null, "predicate", null, 0, -1, ConstraintExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
g1 = createEGenericType(constraintExpressionEClass_T);
initEReference(getConstraintExpression_Expression(), g1, null, "expression", null, 1, 1, ConstraintExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(prefixExpressionEClass, PrefixExpression.class, "PrefixExpression", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getPrefixExpression_Quantifier(), theOperatorsPackage.getQuantifierOp(), null, "quantifier", null, 1, 1, PrefixExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
g1 = createEGenericType(theTypesPackage.getSetType());
EGenericType g2 = createEGenericType();
g1.getETypeArguments().add(g2);
initEReference(getPrefixExpression_Set(), g1, null, "set", null, 1, 1, PrefixExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(booleanExpressionEClass, BooleanExpression.class, "BooleanExpression", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(arithmeticExpressionEClass, ArithmeticExpression.class, "ArithmeticExpression", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(elementExpressionEClass, ElementExpression.class, "ElementExpression", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
g1 = createEGenericType(elementExpressionEClass_ME);
initEReference(getElementExpression_ModelElement(), g1, null, "modelElement", null, 0, 1, ElementExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
}
} //ExpressionsPackageImpl
/**
*/
package org.fortiss.af3.exploration.dsl.model.expressions.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
import org.fortiss.af3.exploration.dsl.model.expressions.ArithmeticExpression;
import org.fortiss.af3.exploration.dsl.model.expressions.ExpressionsPackage;
import org.fortiss.af3.exploration.dsl.model.expressions.ObjectiveExpression;
import org.fortiss.af3.exploration.dsl.model.operators.Operator;
import org.fortiss.af3.exploration.dsl.model.operators.OperatorsPackage;
import org.fortiss.af3.exploration.dsl.model.operators.OptimizationDirection;
import org.fortiss.af3.exploration.dsl.model.operators.OptimizationDirectionEnum;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Objective Expression</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.fortiss.af3.exploration.dsl.model.expressions.impl.ObjectiveExpressionImpl#getOperator <em>Operator</em>}</li>
* <li>{@link org.fortiss.af3.exploration.dsl.model.expressions.impl.ObjectiveExpressionImpl#getRight <em>Right</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class ObjectiveExpressionImpl extends EObjectImpl implements ObjectiveExpression {
/**
* The cached value of the '{@link #getOperator() <em>Operator</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getOperator()
* @generated
* @ordered
*/
protected OptimizationDirectionEnum operator;
/**
* The cached value of the '{@link #getRight() <em>Right</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getRight()
* @generated
* @ordered
*/
protected ArithmeticExpression<?> right;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ObjectiveExpressionImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return ExpressionsPackage.Literals.OBJECTIVE_EXPRESSION;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public OptimizationDirectionEnum getOperator() {
return operator;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setOperator(OptimizationDirectionEnum newOperator) {
OptimizationDirectionEnum oldOperator = operator;
operator = newOperator;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ExpressionsPackage.OBJECTIVE_EXPRESSION__OPERATOR, oldOperator, operator));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ArithmeticExpression<?> getRight() {
if (right != null && ((EObject)right).eIsProxy()) {
InternalEObject oldRight = (InternalEObject)right;
right = (ArithmeticExpression<?>)eResolveProxy(oldRight);
if (right != oldRight) {
InternalEObject newRight = (InternalEObject)right;
NotificationChain msgs = oldRight.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ExpressionsPackage.OBJECTIVE_EXPRESSION__RIGHT, null, null);
if (newRight.eInternalContainer() == null) {
msgs = newRight.eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ExpressionsPackage.OBJECTIVE_EXPRESSION__RIGHT, null, msgs);
}
if (msgs != null) msgs.dispatch();
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ExpressionsPackage.OBJECTIVE_EXPRESSION__RIGHT, oldRight, right));
}
}
return right;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ArithmeticExpression<?> basicGetRight() {
return right;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetRight(ArithmeticExpression<?> newRight, NotificationChain msgs) {
ArithmeticExpression<?> oldRight = right;
right = newRight;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ExpressionsPackage.OBJECTIVE_EXPRESSION__RIGHT, oldRight, newRight);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setRight(ArithmeticExpression<?> newRight) {
if (newRight != right) {
NotificationChain msgs = null;
if (right != null)
msgs = ((InternalEObject)right).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ExpressionsPackage.OBJECTIVE_EXPRESSION__RIGHT, null, msgs);
if (newRight != null)
msgs = ((InternalEObject)newRight).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ExpressionsPackage.OBJECTIVE_EXPRESSION__RIGHT, null, msgs);
msgs = basicSetRight(newRight, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ExpressionsPackage.OBJECTIVE_EXPRESSION__RIGHT, newRight, newRight));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case ExpressionsPackage.OBJECTIVE_EXPRESSION__RIGHT:
return basicSetRight(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case ExpressionsPackage.OBJECTIVE_EXPRESSION__OPERATOR:
return getOperator();
case ExpressionsPackage.OBJECTIVE_EXPRESSION__RIGHT:
if (resolve) return getRight();
return basicGetRight();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case ExpressionsPackage.OBJECTIVE_EXPRESSION__OPERATOR:
setOperator((OptimizationDirectionEnum)newValue);
return;
case ExpressionsPackage.OBJECTIVE_EXPRESSION__RIGHT:
setRight((ArithmeticExpression<?>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case ExpressionsPackage.OBJECTIVE_EXPRESSION__OPERATOR:
setOperator((OptimizationDirectionEnum)null);
return;
case ExpressionsPackage.OBJECTIVE_EXPRESSION__RIGHT:
setRight((ArithmeticExpression<?>)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case ExpressionsPackage.OBJECTIVE_EXPRESSION__OPERATOR:
return operator != null;
case ExpressionsPackage.OBJECTIVE_EXPRESSION__RIGHT:
return right != null;
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
if (baseClass == Operator.class) {
switch (derivedFeatureID) {
case ExpressionsPackage.OBJECTIVE_EXPRESSION__OPERATOR: return OperatorsPackage.OPERATOR__OPERATOR;
case ExpressionsPackage.OBJECTIVE_EXPRESSION__RIGHT: return OperatorsPackage.OPERATOR__RIGHT;
default: return -1;
}
}
if (baseClass == OptimizationDirection.class) {
switch (derivedFeatureID) {
default: return -1;
}
}
return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
if (baseClass == Operator.class) {
switch (baseFeatureID) {
case OperatorsPackage.OPERATOR__OPERATOR: return ExpressionsPackage.OBJECTIVE_EXPRESSION__OPERATOR;
case OperatorsPackage.OPERATOR__RIGHT: return ExpressionsPackage.OBJECTIVE_EXPRESSION__RIGHT;
default: return -1;
}
}
if (baseClass == OptimizationDirection.class) {
switch (baseFeatureID) {
default: return -1;
}
}
return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (operator: ");
result.append(operator);
result.append(')');
return result.toString();
}
} //ObjectiveExpressionImpl
/**
*/
package org.fortiss.af3.exploration.dsl.model.expressions.util;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
import org.eclipse.emf.ecore.EObject;
import org.fortiss.af3.exploration.dsl.model.expressions.*;
import org.fortiss.af3.exploration.dsl.model.operators.Operator;
import org.fortiss.af3.exploration.dsl.model.operators.OptimizationDirection;
import org.fortiss.tooling.base.model.element.IModelElement;
/**
* <!-- begin-user-doc -->
* The <b>Adapter Factory</b> for the model.
* It provides an adapter <code>createXXX</code> method for each class of the model.
* <!-- end-user-doc -->
* @see org.fortiss.af3.exploration.dsl.model.expressions.ExpressionsPackage
* @generated
*/
public class ExpressionsAdapterFactory extends AdapterFactoryImpl {
/**
* The cached model package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static ExpressionsPackage modelPackage;
/**
* Creates an instance of the adapter factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ExpressionsAdapterFactory() {
if (modelPackage == null) {
modelPackage = ExpressionsPackage.eINSTANCE;
}
}
/**
* Returns whether this factory is applicable for the type of the object.
* <!-- begin-user-doc -->
* This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
* <!-- end-user-doc -->
* @return whether this factory is applicable for the type of the object.
* @generated
*/
@Override
public boolean isFactoryForType(Object object) {
if (object == modelPackage) {
return true;
}
if (object instanceof EObject) {
return ((EObject)object).eClass().getEPackage() == modelPackage;
}
return false;
}
/**
* The switch that delegates to the <code>createXXX</code> methods.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ExpressionsSwitch<Adapter> modelSwitch =
new ExpressionsSwitch<Adapter>() {
@Override
public Adapter caseExpression(Expression object) {
return createExpressionAdapter();
}
@Override
public Adapter caseObjectiveExpression(ObjectiveExpression object) {
return createObjectiveExpressionAdapter();
}
@Override
public <T extends BooleanExpression> Adapter caseConstraintExpression(ConstraintExpression<T> object) {
return createConstraintExpressionAdapter();
}
@Override
public Adapter casePrefixExpression(PrefixExpression object) {
return createPrefixExpressionAdapter();
}
@Override
public Adapter caseBooleanExpression(BooleanExpression object) {
return createBooleanExpressionAdapter();
}
@Override
public <T> Adapter caseArithmeticExpression(ArithmeticExpression<T> object) {
return createArithmeticExpressionAdapter();
}
@Override
public <ME extends IModelElement> Adapter caseElementExpression(ElementExpression<ME> object) {
return createElementExpressionAdapter();
}
@Override
public <OP, RHT> Adapter caseOperator(Operator<OP, RHT> object) {
return createOperatorAdapter();
}
@Override
public Adapter caseOptimizationDirection(OptimizationDirection object) {
return createOptimizationDirectionAdapter();
}
@Override
public Adapter defaultCase(EObject object) {
return createEObjectAdapter();
}
};
/**
* Creates an adapter for the <code>target</code>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param target the object to adapt.
* @return the adapter for the <code>target</code>.
* @generated
*/
@Override
public Adapter createAdapter(Notifier target) {
return modelSwitch.doSwitch((EObject)target);
}
/**
* Creates a new adapter for an object of class '{@link org.fortiss.af3.exploration.dsl.model.expressions.Expression <em>Expression</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see org.fortiss.af3.exploration.dsl.model.expressions.Expression
* @generated
*/
public Adapter createExpressionAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.fortiss.af3.exploration.dsl.model.expressions.ObjectiveExpression <em>Objective Expression</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see org.fortiss.af3.exploration.dsl.model.expressions.ObjectiveExpression
* @generated
*/
public Adapter createObjectiveExpressionAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.fortiss.af3.exploration.dsl.model.expressions.ConstraintExpression <em>Constraint Expression</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see org.fortiss.af3.exploration.dsl.model.expressions.ConstraintExpression
* @generated
*/
public Adapter createConstraintExpressionAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.fortiss.af3.exploration.dsl.model.expressions.PrefixExpression <em>Prefix Expression</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see org.fortiss.af3.exploration.dsl.model.expressions.PrefixExpression
* @generated
*/
public Adapter createPrefixExpressionAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.fortiss.af3.exploration.dsl.model.expressions.BooleanExpression <em>Boolean Expression</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see org.fortiss.af3.exploration.dsl.model.expressions.BooleanExpression
* @generated
*/
public Adapter createBooleanExpressionAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.fortiss.af3.exploration.dsl.model.expressions.ArithmeticExpression <em>Arithmetic Expression</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see org.fortiss.af3.exploration.dsl.model.expressions.ArithmeticExpression
* @generated
*/
public Adapter createArithmeticExpressionAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.fortiss.af3.exploration.dsl.model.expressions.ElementExpression <em>Element Expression</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see org.fortiss.af3.exploration.dsl.model.expressions.ElementExpression
* @generated
*/
public Adapter createElementExpressionAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.fortiss.af3.exploration.dsl.model.operators.Operator <em>Operator</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see org.fortiss.af3.exploration.dsl.model.operators.Operator
* @generated
*/
public Adapter createOperatorAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.fortiss.af3.exploration.dsl.model.operators.OptimizationDirection <em>Optimization Direction</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see org.fortiss.af3.exploration.dsl.model.operators.OptimizationDirection
* @generated
*/
public Adapter createOptimizationDirectionAdapter() {
return null;
}
/**
* Creates a new adapter for the default case.
* <!-- begin-user-doc -->
* This default implementation returns null.
* <!-- end-user-doc -->
* @return the new adapter.
* @generated
*/
public Adapter createEObjectAdapter() {
return null;
}
} //ExpressionsAdapterFactory
/**
*/
package org.fortiss.af3.exploration.dsl.model.expressions.util;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.Switch;
import org.fortiss.af3.exploration.dsl.model.expressions.*;
import org.fortiss.af3.exploration.dsl.model.operators.Operator;
import org.fortiss.af3.exploration.dsl.model.operators.OptimizationDirection;
import org.fortiss.tooling.base.model.element.IModelElement;
/**
* <!-- begin-user-doc -->
* The <b>Switch</b> for the model's inheritance hierarchy.
* It supports the call {@link #doSwitch(EObject) doSwitch(object)}
* to invoke the <code>caseXXX</code> method for each class of the model,
* starting with the actual class of the object
* and proceeding up the inheritance hierarchy
* until a non-null result is returned,
* which is the result of the switch.
* <!-- end-user-doc -->
* @see org.fortiss.af3.exploration.dsl.model.expressions.ExpressionsPackage
* @generated
*/
public class ExpressionsSwitch<T1> extends Switch<T1> {
/**
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static ExpressionsPackage modelPackage;
/**
* Creates an instance of the switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ExpressionsSwitch() {
if (modelPackage == null) {
modelPackage = ExpressionsPackage.eINSTANCE;
}
}
/**
* Checks whether this is a switch for the given package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @parameter ePackage the package in question.
* @return whether this is a switch for the given package.
* @generated
*/
@Override
protected boolean isSwitchFor(EPackage ePackage) {
return ePackage == modelPackage;
}
/**
* Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
@Override
protected T1 doSwitch(int classifierID, EObject theEObject) {
switch (classifierID) {
case ExpressionsPackage.EXPRESSION: {
Expression expression = (Expression)theEObject;
T1 result = caseExpression(expression);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ExpressionsPackage.OBJECTIVE_EXPRESSION: {
ObjectiveExpression objectiveExpression = (ObjectiveExpression)theEObject;
T1 result = caseObjectiveExpression(objectiveExpression);
if (result == null) result = caseExpression(objectiveExpression);
if (result == null) result = caseOptimizationDirection(objectiveExpression);
if (result == null) result = caseOperator(objectiveExpression);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ExpressionsPackage.CONSTRAINT_EXPRESSION: {
ConstraintExpression<?> constraintExpression = (ConstraintExpression<?>)theEObject;
T1 result = caseConstraintExpression(constraintExpression);
if (result == null) result = caseExpression(constraintExpression);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ExpressionsPackage.PREFIX_EXPRESSION: {
PrefixExpression prefixExpression = (PrefixExpression)theEObject;
T1 result = casePrefixExpression(prefixExpression);
if (result == null) result = caseExpression(prefixExpression);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ExpressionsPackage.BOOLEAN_EXPRESSION: {
BooleanExpression booleanExpression = (BooleanExpression)theEObject;
T1 result = caseBooleanExpression(booleanExpression);
if (result == null) result = caseExpression(booleanExpression);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ExpressionsPackage.ARITHMETIC_EXPRESSION: {
ArithmeticExpression<?> arithmeticExpression = (ArithmeticExpression<?>)theEObject;
T1 result = caseArithmeticExpression(arithmeticExpression);
if (result == null) result = caseExpression(arithmeticExpression);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ExpressionsPackage.ELEMENT_EXPRESSION: {
ElementExpression<?> elementExpression = (ElementExpression<?>)theEObject;
T1 result = caseElementExpression(elementExpression);
if (result == null) result = caseExpression(elementExpression);
if (result == null) result = defaultCase(theEObject);
return result;
}
default: return defaultCase(theEObject);
}
}
/**
* Returns the result of interpreting the object as an instance of '<em>Expression</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Expression</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseExpression(Expression object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Objective Expression</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Objective Expression</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseObjectiveExpression(ObjectiveExpression object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Constraint Expression</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Constraint Expression</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public <T extends BooleanExpression> T1 caseConstraintExpression(ConstraintExpression<T> object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Prefix Expression</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Prefix Expression</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 casePrefixExpression(PrefixExpression object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Boolean Expression</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Boolean Expression</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseBooleanExpression(BooleanExpression object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Arithmetic Expression</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Arithmetic Expression</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public <T> T1 caseArithmeticExpression(ArithmeticExpression<T> object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Element Expression</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Element Expression</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public <ME extends IModelElement> T1 caseElementExpression(ElementExpression<ME> object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Operator</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Operator</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public <OP, RHT> T1 caseOperator(Operator<OP, RHT> object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Optimization Direction</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Optimization Direction</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseOptimizationDirection(OptimizationDirection object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch, but this is the last case anyway.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>EObject</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject)
* @generated
*/
@Override
public T1 defaultCase(EObject object) {
return null;
}
} //ExpressionsSwitch
/**
*/
package org.fortiss.af3.exploration.dsl.model.impl;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
import org.fortiss.af3.exploration.dsl.model.*;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
* @generated
*/
public class ModelFactoryImpl extends EFactoryImpl implements ModelFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static ModelFactory init() {
try {
ModelFactory theModelFactory = (ModelFactory)EPackage.Registry.INSTANCE.getEFactory(ModelPackage.eNS_URI);
if (theModelFactory != null) {
return theModelFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new ModelFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ModelFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ModelPackage getModelPackage() {
return (ModelPackage)getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static ModelPackage getPackage() {
return ModelPackage.eINSTANCE;
}
} //ModelFactoryImpl
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment