blob: a1236db0cdd5acf2d73054d145474ee476f5ec67 [file] [log] [blame]
/**
* <copyright>
*
* Copyright (c) 2013, 2018 Willink Transformations and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v20.html
*
* Contributors:
* E.D.Willink - Initial API and implementation
*
* </copyright>
*/
package org.eclipse.qvtd.pivot.qvtcore;
import java.util.Map;
import org.eclipse.emf.common.util.DiagnosticChain;
import org.eclipse.ocl.pivot.Variable;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Guard Variable</b></em>'.
* <!-- end-user-doc -->
*
*
* @see org.eclipse.qvtd.pivot.qvtcore.QVTcorePackage#getGuardVariable()
* @model
* @generated
*/
public interface GuardVariable extends Variable {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @model annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='NoInitializer'"
* annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot body='ownedInit = null\n\n'"
* annotation="http://www.eclipse.org/emf/2002/GenModel body='try {\n\t/**\n\t *\n\t * inv NoInitializer:\n\t * let severity : Integer[1] = \'GuardVariable::NoInitializer\'.getSeverity()\n\t * in\n\t * if severity &lt;= 0\n\t * then true\n\t * else\n\t * let result : Boolean[1] = ownedInit = null\n\t * in\n\t * \'GuardVariable::NoInitializer\'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)\n\t * endif\n\t \052/\n\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.evaluation.@&lt;%org.eclipse.jdt.annotation.NonNull%&gt; Executor executor = &lt;%org.eclipse.ocl.pivot.utilities.PivotUtil%&gt;.getExecutor(this, context);\n\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.values.@&lt;%org.eclipse.jdt.annotation.NonNull%&gt; IntegerValue severity_0 = &lt;%org.eclipse.ocl.pivot.library.string.CGStringGetSeverityOperation%&gt;.INSTANCE.evaluate(executor, &lt;%org.eclipse.qvtd.pivot.qvtcore.QVTcoreTables%&gt;.STR_GuardVariable_c_c_NoInitializer);\n\tfinal /*@NonInvalid\052/ boolean le = &lt;%org.eclipse.ocl.pivot.library.oclany.OclComparableLessThanEqualOperation%&gt;.INSTANCE.evaluate(executor, severity_0, &lt;%org.eclipse.qvtd.pivot.qvtcore.QVTcoreTables%&gt;.INT_0).booleanValue();\n\t/*@NonInvalid\052/ boolean symbol_0;\n\tif (le) {\n\t\tsymbol_0 = &lt;%org.eclipse.ocl.pivot.utilities.ValueUtil%&gt;.TRUE_VALUE;\n\t}\n\telse {\n\t\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.@&lt;%org.eclipse.jdt.annotation.Nullable%&gt; OCLExpression ownedInit = this.getOwnedInit();\n\t\tfinal /*@NonInvalid\052/ boolean result = ownedInit == null;\n\t\tfinal /*@NonInvalid\052/ boolean logDiagnostic = &lt;%org.eclipse.ocl.pivot.library.string.CGStringLogDiagnosticOperation%&gt;.INSTANCE.evaluate(executor, &lt;%org.eclipse.ocl.pivot.ids.TypeId%&gt;.BOOLEAN, &lt;%org.eclipse.qvtd.pivot.qvtcore.QVTcoreTables%&gt;.STR_GuardVariable_c_c_NoInitializer, this, (Object)null, diagnostics, context, (Object)null, severity_0, result, &lt;%org.eclipse.qvtd.pivot.qvtcore.QVTcoreTables%&gt;.INT_0).booleanValue();\n\t\tsymbol_0 = logDiagnostic;\n\t}\n\treturn Boolean.TRUE == symbol_0;\n}\ncatch (&lt;%java.lang.Throwable%&gt; e) {\n\treturn &lt;%org.eclipse.ocl.pivot.utilities.ValueUtil%&gt;.validationFailedDiagnostic(\"GuardVariable::NoInitializer\", this, diagnostics, context, e);\n}'"
* @generated
*/
boolean validateNoInitializer(DiagnosticChain diagnostics, Map<Object, Object> context);
} // GuardVariable