Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/impl/LogicalExpressionImpl.java')
-rw-r--r--plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/impl/LogicalExpressionImpl.java421
1 files changed, 421 insertions, 0 deletions
diff --git a/plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/impl/LogicalExpressionImpl.java b/plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/impl/LogicalExpressionImpl.java
new file mode 100644
index 00000000000..34bbaa28b88
--- /dev/null
+++ b/plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/impl/LogicalExpressionImpl.java
@@ -0,0 +1,421 @@
+/**
+ */
+package org.eclipse.papyrus.uml.alf.impl;
+
+import java.lang.reflect.InvocationTargetException;
+import java.math.BigInteger;
+import java.util.Map;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.DiagnosticChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.WrappedException;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EOperation;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.emf.ecore.util.EObjectValidator;
+import org.eclipse.papyrus.uml.alf.AlfPackage;
+import org.eclipse.papyrus.uml.alf.ElementReference;
+import org.eclipse.papyrus.uml.alf.LogicalExpression;
+import org.eclipse.papyrus.uml.alf.util.AlfValidator;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Logical Expression</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.uml.alf.impl.LogicalExpressionImpl#isIsBitWise <em>Is Bit Wise</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.alf.impl.LogicalExpressionImpl#isIsBitStringConversion1 <em>Is Bit String Conversion1</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.alf.impl.LogicalExpressionImpl#isIsBitStringConversion2 <em>Is Bit String Conversion2</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class LogicalExpressionImpl extends BinaryExpressionImpl implements LogicalExpression {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected LogicalExpressionImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return AlfPackage.eINSTANCE.getLogicalExpression();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean isIsBitWise() {
+ return (Boolean) eGet(AlfPackage.eINSTANCE.getLogicalExpression_IsBitWise(), true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setIsBitWise(boolean newIsBitWise) {
+ eSet(AlfPackage.eINSTANCE.getLogicalExpression_IsBitWise(), newIsBitWise);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean isIsBitStringConversion1() {
+ return (Boolean) eGet(AlfPackage.eINSTANCE.getLogicalExpression_IsBitStringConversion1(), true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setIsBitStringConversion1(boolean newIsBitStringConversion1) {
+ eSet(AlfPackage.eINSTANCE.getLogicalExpression_IsBitStringConversion1(), newIsBitStringConversion1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean isIsBitStringConversion2() {
+ return (Boolean) eGet(AlfPackage.eINSTANCE.getLogicalExpression_IsBitStringConversion2(), true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setIsBitStringConversion2(boolean newIsBitStringConversion2) {
+ eSet(AlfPackage.eINSTANCE.getLogicalExpression_IsBitStringConversion2(), newIsBitStringConversion2);
+ }
+
+ /**
+ * The cached invocation delegate for the '{@link #type() <em>Type</em>}' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #type()
+ * @generated
+ * @ordered
+ */
+ protected static final EOperation.Internal.InvocationDelegate TYPE__EINVOCATION_DELEGATE = ((EOperation.Internal) AlfPackage.eINSTANCE.getLogicalExpression__Type()).getInvocationDelegate();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ElementReference type() {
+ try {
+ return (ElementReference) TYPE__EINVOCATION_DELEGATE.dynamicInvoke(this, null);
+ } catch (InvocationTargetException ite) {
+ throw new WrappedException(ite);
+ }
+ }
+
+ /**
+ * The cached invocation delegate for the '{@link #lower() <em>Lower</em>}' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #lower()
+ * @generated
+ * @ordered
+ */
+ protected static final EOperation.Internal.InvocationDelegate LOWER__EINVOCATION_DELEGATE = ((EOperation.Internal) AlfPackage.eINSTANCE.getLogicalExpression__Lower()).getInvocationDelegate();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public BigInteger lower() {
+ try {
+ return (BigInteger) LOWER__EINVOCATION_DELEGATE.dynamicInvoke(this, null);
+ } catch (InvocationTargetException ite) {
+ throw new WrappedException(ite);
+ }
+ }
+
+ /**
+ * The cached invocation delegate for the '{@link #upper() <em>Upper</em>}' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #upper()
+ * @generated
+ * @ordered
+ */
+ protected static final EOperation.Internal.InvocationDelegate UPPER__EINVOCATION_DELEGATE = ((EOperation.Internal) AlfPackage.eINSTANCE.getLogicalExpression__Upper()).getInvocationDelegate();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public BigInteger upper() {
+ try {
+ return (BigInteger) UPPER__EINVOCATION_DELEGATE.dynamicInvoke(this, null);
+ } catch (InvocationTargetException ite) {
+ throw new WrappedException(ite);
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean logicalExpressionTypeDerivation(DiagnosticChain diagnostics, Map<Object, Object> context) {
+ // TODO: implement this method
+ // -> specify the condition that violates the invariant
+ // -> verify the details of the diagnostic, including severity and message
+ // Ensure that you remove @generated or mark it @generated NOT
+ if (false) {
+ if (diagnostics != null) {
+ diagnostics.add
+ (new BasicDiagnostic
+ (Diagnostic.ERROR,
+ AlfValidator.DIAGNOSTIC_SOURCE,
+ AlfValidator.LOGICAL_EXPRESSION__LOGICAL_EXPRESSION_TYPE_DERIVATION,
+ EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "logicalExpressionTypeDerivation", EObjectValidator.getObjectLabel(this, context) }),
+ new Object[] { this }));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean logicalExpressionLowerDerivation(DiagnosticChain diagnostics, Map<Object, Object> context) {
+ // TODO: implement this method
+ // -> specify the condition that violates the invariant
+ // -> verify the details of the diagnostic, including severity and message
+ // Ensure that you remove @generated or mark it @generated NOT
+ if (false) {
+ if (diagnostics != null) {
+ diagnostics.add
+ (new BasicDiagnostic
+ (Diagnostic.ERROR,
+ AlfValidator.DIAGNOSTIC_SOURCE,
+ AlfValidator.LOGICAL_EXPRESSION__LOGICAL_EXPRESSION_LOWER_DERIVATION,
+ EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "logicalExpressionLowerDerivation", EObjectValidator.getObjectLabel(this, context) }),
+ new Object[] { this }));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean logicalExpressionUpperDerivation(DiagnosticChain diagnostics, Map<Object, Object> context) {
+ // TODO: implement this method
+ // -> specify the condition that violates the invariant
+ // -> verify the details of the diagnostic, including severity and message
+ // Ensure that you remove @generated or mark it @generated NOT
+ if (false) {
+ if (diagnostics != null) {
+ diagnostics.add
+ (new BasicDiagnostic
+ (Diagnostic.ERROR,
+ AlfValidator.DIAGNOSTIC_SOURCE,
+ AlfValidator.LOGICAL_EXPRESSION__LOGICAL_EXPRESSION_UPPER_DERIVATION,
+ EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "logicalExpressionUpperDerivation", EObjectValidator.getObjectLabel(this, context) }),
+ new Object[] { this }));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * The cached validation expression for the '{@link #logicalExpressionOperands(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Logical Expression Operands</em>}' invariant operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #logicalExpressionOperands(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map)
+ * @generated
+ * @ordered
+ */
+ protected static final String LOGICAL_EXPRESSION_OPERANDS_DIAGNOSTIC_CHAIN_MAP__EEXPRESSION = "\n" +
+ " let type1 = self.operand1.type in\n" +
+ " let type2 = self.operand2.type in\n" +
+ " self.isBooleanType(type1) and self.isBooleanType(type2) or\n" +
+ " (self.isIntegerType(type1) or self.isBitStringType(type1)) and\n" +
+ " (self.isIntegerType(type2) or self.isBitStringType(type2))";
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean logicalExpressionOperands(DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return AlfValidator.validate
+ (AlfPackage.eINSTANCE.getLogicalExpression(),
+ this,
+ diagnostics,
+ context,
+ "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot",
+ AlfPackage.eINSTANCE.getLogicalExpression__LogicalExpressionOperands__DiagnosticChain_Map(),
+ LOGICAL_EXPRESSION_OPERANDS_DIAGNOSTIC_CHAIN_MAP__EEXPRESSION,
+ Diagnostic.ERROR,
+ AlfValidator.DIAGNOSTIC_SOURCE,
+ AlfValidator.LOGICAL_EXPRESSION__LOGICAL_EXPRESSION_OPERANDS);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean logicalExpressionIsBitStringConversion1Derivation(DiagnosticChain diagnostics, Map<Object, Object> context) {
+ // TODO: implement this method
+ // -> specify the condition that violates the invariant
+ // -> verify the details of the diagnostic, including severity and message
+ // Ensure that you remove @generated or mark it @generated NOT
+ if (false) {
+ if (diagnostics != null) {
+ diagnostics.add
+ (new BasicDiagnostic
+ (Diagnostic.ERROR,
+ AlfValidator.DIAGNOSTIC_SOURCE,
+ AlfValidator.LOGICAL_EXPRESSION__LOGICAL_EXPRESSION_IS_BIT_STRING_CONVERSION1_DERIVATION,
+ EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "logicalExpressionIsBitStringConversion1Derivation", EObjectValidator.getObjectLabel(this, context) }),
+ new Object[] { this }));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean logicalExpressionIsBitStringConversion2Derivation(DiagnosticChain diagnostics, Map<Object, Object> context) {
+ // TODO: implement this method
+ // -> specify the condition that violates the invariant
+ // -> verify the details of the diagnostic, including severity and message
+ // Ensure that you remove @generated or mark it @generated NOT
+ if (false) {
+ if (diagnostics != null) {
+ diagnostics.add
+ (new BasicDiagnostic
+ (Diagnostic.ERROR,
+ AlfValidator.DIAGNOSTIC_SOURCE,
+ AlfValidator.LOGICAL_EXPRESSION__LOGICAL_EXPRESSION_IS_BIT_STRING_CONVERSION2_DERIVATION,
+ EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "logicalExpressionIsBitStringConversion2Derivation", EObjectValidator.getObjectLabel(this, context) }),
+ new Object[] { this }));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean logicalExpressionIsBitWiseDerivation(DiagnosticChain diagnostics, Map<Object, Object> context) {
+ // TODO: implement this method
+ // -> specify the condition that violates the invariant
+ // -> verify the details of the diagnostic, including severity and message
+ // Ensure that you remove @generated or mark it @generated NOT
+ if (false) {
+ if (diagnostics != null) {
+ diagnostics.add
+ (new BasicDiagnostic
+ (Diagnostic.ERROR,
+ AlfValidator.DIAGNOSTIC_SOURCE,
+ AlfValidator.LOGICAL_EXPRESSION__LOGICAL_EXPRESSION_IS_BIT_WISE_DERIVATION,
+ EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "logicalExpressionIsBitWiseDerivation", EObjectValidator.getObjectLabel(this, context) }),
+ new Object[] { this }));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ @SuppressWarnings("unchecked")
+ public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
+ switch (operationID) {
+ case AlfPackage.LOGICAL_EXPRESSION___TYPE:
+ return type();
+ case AlfPackage.LOGICAL_EXPRESSION___LOWER:
+ return lower();
+ case AlfPackage.LOGICAL_EXPRESSION___UPPER:
+ return upper();
+ case AlfPackage.LOGICAL_EXPRESSION___LOGICAL_EXPRESSION_TYPE_DERIVATION__DIAGNOSTICCHAIN_MAP:
+ return logicalExpressionTypeDerivation((DiagnosticChain) arguments.get(0), (Map<Object, Object>) arguments.get(1));
+ case AlfPackage.LOGICAL_EXPRESSION___LOGICAL_EXPRESSION_LOWER_DERIVATION__DIAGNOSTICCHAIN_MAP:
+ return logicalExpressionLowerDerivation((DiagnosticChain) arguments.get(0), (Map<Object, Object>) arguments.get(1));
+ case AlfPackage.LOGICAL_EXPRESSION___LOGICAL_EXPRESSION_UPPER_DERIVATION__DIAGNOSTICCHAIN_MAP:
+ return logicalExpressionUpperDerivation((DiagnosticChain) arguments.get(0), (Map<Object, Object>) arguments.get(1));
+ case AlfPackage.LOGICAL_EXPRESSION___LOGICAL_EXPRESSION_OPERANDS__DIAGNOSTICCHAIN_MAP:
+ return logicalExpressionOperands((DiagnosticChain) arguments.get(0), (Map<Object, Object>) arguments.get(1));
+ case AlfPackage.LOGICAL_EXPRESSION___LOGICAL_EXPRESSION_IS_BIT_STRING_CONVERSION1_DERIVATION__DIAGNOSTICCHAIN_MAP:
+ return logicalExpressionIsBitStringConversion1Derivation((DiagnosticChain) arguments.get(0), (Map<Object, Object>) arguments.get(1));
+ case AlfPackage.LOGICAL_EXPRESSION___LOGICAL_EXPRESSION_IS_BIT_STRING_CONVERSION2_DERIVATION__DIAGNOSTICCHAIN_MAP:
+ return logicalExpressionIsBitStringConversion2Derivation((DiagnosticChain) arguments.get(0), (Map<Object, Object>) arguments.get(1));
+ case AlfPackage.LOGICAL_EXPRESSION___LOGICAL_EXPRESSION_IS_BIT_WISE_DERIVATION__DIAGNOSTICCHAIN_MAP:
+ return logicalExpressionIsBitWiseDerivation((DiagnosticChain) arguments.get(0), (Map<Object, Object>) arguments.get(1));
+ }
+ return super.eInvoke(operationID, arguments);
+ }
+
+} // LogicalExpressionImpl

Back to the top