| /******************************************************************************* |
| * Copyright (c) 2011, 2019 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 |
| *******************************************************************************/ |
| package org.eclipse.qvtd.pivot.qvttemplate; |
| |
| import java.util.Map; |
| import org.eclipse.emf.common.util.DiagnosticChain; |
| import org.eclipse.emf.common.util.EList; |
| import org.eclipse.ocl.pivot.CollectionType; |
| import org.eclipse.ocl.pivot.OCLExpression; |
| import org.eclipse.ocl.pivot.Variable; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * A representation of the model object '<em><b>Collection Template Exp</b></em>'. |
| * <!-- end-user-doc --> |
| * |
| * <p> |
| * The following features are supported: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.qvtd.pivot.qvttemplate.CollectionTemplateExp#getMember <em>Member</em>}</li> |
| * <li>{@link org.eclipse.qvtd.pivot.qvttemplate.CollectionTemplateExp#getReferredCollectionType <em>Referred Collection Type</em>}</li> |
| * <li>{@link org.eclipse.qvtd.pivot.qvttemplate.CollectionTemplateExp#getRest <em>Rest</em>}</li> |
| * </ul> |
| * |
| * @see org.eclipse.qvtd.pivot.qvttemplate.QVTtemplatePackage#getCollectionTemplateExp() |
| * @model |
| * @generated |
| */ |
| public interface CollectionTemplateExp extends TemplateExp { |
| /** |
| * Returns the value of the '<em><b>Member</b></em>' containment reference list. |
| * The list contents are of type {@link org.eclipse.ocl.pivot.OCLExpression}. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of the '<em>Member</em>' containment reference list isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @return the value of the '<em>Member</em>' containment reference list. |
| * @see org.eclipse.qvtd.pivot.qvttemplate.QVTtemplatePackage#getCollectionTemplateExp_Member() |
| * @model containment="true" ordered="false" |
| * annotation="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName body='listContainer'" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://www.eclipse.org/qvt/2015/QVTtemplate!CollectionTemplateExp!member'" |
| * @generated |
| */ |
| EList<OCLExpression> getMember(); |
| |
| /** |
| * Returns the value of the '<em><b>Referred Collection Type</b></em>' reference. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of the '<em>Referred Collection Type</em>' reference isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @return the value of the '<em>Referred Collection Type</em>' reference. |
| * @see #setReferredCollectionType(CollectionType) |
| * @see org.eclipse.qvtd.pivot.qvttemplate.QVTtemplatePackage#getCollectionTemplateExp_ReferredCollectionType() |
| * @model required="true" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://www.eclipse.org/qvt/2015/QVTtemplate!CollectionTemplateExp!referredCollectionType'" |
| * @generated |
| */ |
| CollectionType getReferredCollectionType(); |
| |
| /** |
| * Sets the value of the '{@link org.eclipse.qvtd.pivot.qvttemplate.CollectionTemplateExp#getReferredCollectionType <em>Referred Collection Type</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @param value the new value of the '<em>Referred Collection Type</em>' reference. |
| * @see #getReferredCollectionType() |
| * @generated |
| */ |
| void setReferredCollectionType(CollectionType value); |
| |
| /** |
| * Returns the value of the '<em><b>Rest</b></em>' reference. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of the '<em>Rest</em>' reference isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @return the value of the '<em>Rest</em>' reference. |
| * @see #setRest(Variable) |
| * @see org.eclipse.qvtd.pivot.qvttemplate.QVTtemplatePackage#getCollectionTemplateExp_Rest() |
| * @model annotation="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName body='matchingExp'" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://www.eclipse.org/qvt/2015/QVTtemplate!CollectionTemplateExp!rest'" |
| * @generated |
| */ |
| Variable getRest(); |
| |
| /** |
| * Sets the value of the '{@link org.eclipse.qvtd.pivot.qvttemplate.CollectionTemplateExp#getRest <em>Rest</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @param value the new value of the '<em>Rest</em>' reference. |
| * @see #getRest() |
| * @generated |
| */ |
| void setRest(Variable value); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @model annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='MemberTypeisCollectionElementType'" |
| * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot body='\n\tmember->forAll(type?.conformsTo(referredCollectionType.elementType))\n\n'" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel body='final <%java.lang.<%@<%org.eclipse.jdt.annotation.NonNull%> %>String%> constraintName = \"CollectionTemplateExp::MemberTypeisCollectionElementType\";\ntry {\n\t/**\n\t *\n\t * inv MemberTypeisCollectionElementType:\n\t * let severity : Integer[1] = constraintName.getSeverity()\n\t * in\n\t * if severity <= 0\n\t * then true\n\t * else\n\t * let\n\t * result : Boolean[?] = member->forAll(\n\t * type?.conformsTo(referredCollectionType.elementType))\n\t * in\n\t * constraintName.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)\n\t * endif\n\t \052/\n\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.evaluation.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Executor%> executor = <%org.eclipse.ocl.pivot.utilities.PivotUtil%>.getExecutor(this, context);\n\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.ids.<%@<%org.eclipse.jdt.annotation.NonNull%> %>IdResolver%> idResolver = executor.getIdResolver();\n\t/*@Caught\052/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> CAUGHT_severity_0;\n\ttry {\n\t\tfinal /*@Thrown\052/ <%org.eclipse.ocl.pivot.values.<%@<%org.eclipse.jdt.annotation.NonNull%> %>IntegerValue%> severity_0 = <%org.eclipse.ocl.pivot.library.string.CGStringGetSeverityOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplatePackage%>.Literals.COLLECTION_TEMPLATE_EXP___VALIDATE_MEMBER_TYPEIS_COLLECTION_ELEMENT_TYPE__DIAGNOSTICCHAIN_MAP);\n\t\tCAUGHT_severity_0 = severity_0;\n\t}\n\tcatch (<%java.lang.Exception%> e) {\n\t\tCAUGHT_severity_0 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t}\n\tif (CAUGHT_severity_0 instanceof <%org.eclipse.ocl.pivot.values.InvalidValueException%>) {\n\t\tthrow (<%org.eclipse.ocl.pivot.values.InvalidValueException%>)CAUGHT_severity_0;\n\t}\n\tfinal /*@Thrown\052/ boolean le = <%org.eclipse.ocl.pivot.library.oclany.OclComparableLessThanEqualOperation%>.INSTANCE.evaluate(executor, CAUGHT_severity_0, <%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateTables%>.INT_0).booleanValue();\n\t/*@NonInvalid\052/ boolean symbol_0;\n\tif (le) {\n\t\tsymbol_0 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t}\n\telse {\n\t\t/*@Caught\052/ <%<%@<%org.eclipse.jdt.annotation.Nullable%> %>Object%> CAUGHT_result;\n\t\ttry {\n\t\t\t@SuppressWarnings(\"null\")\n\t\t\tfinal /*@NonInvalid\052/ <%java.util.<%@<%org.eclipse.jdt.annotation.NonNull%> %>List%><<%org.eclipse.ocl.pivot.OCLExpression%>> member = this.getMember();\n\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.values.<%@<%org.eclipse.jdt.annotation.NonNull%> %>SetValue%> BOXED_member = idResolver.createSetOfAll(<%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateTables%>.SET_CLSSid_OCLExpression, member);\n\t\t\t/*@Thrown\052/ <%<%@<%org.eclipse.jdt.annotation.Nullable%> %>Object%> accumulator = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t\t\t<%java.util.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Iterator%><<%java.lang.Object%>> ITERATOR__1 = BOXED_member.iterator();\n\t\t\t/*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Boolean%> result;\n\t\t\twhile (true) {\n\t\t\t\tif (!ITERATOR__1.hasNext()) {\n\t\t\t\t\tif (accumulator == null) {\n\t\t\t\t\t\tresult = null;\n\t\t\t\t\t}\n\t\t\t\t\telse if (accumulator == <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE) {\n\t\t\t\t\t\tresult = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthrow (<%org.eclipse.ocl.pivot.values.InvalidValueException%>)accumulator;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\t/*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>OCLExpression%> _1 = (<%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>OCLExpression%>)ITERATOR__1.next();\n\t\t\t\t/**\n\t\t\t\t *\n\t\t\t\t * type?.conformsTo(referredCollectionType.elementType)\n\t\t\t\t \052/\n\t\t\t\t/*@Caught\052/ <%<%@<%org.eclipse.jdt.annotation.Nullable%> %>Object%> CAUGHT_safe_conformsTo_source;\n\t\t\t\ttry {\n\t\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Type%> type = _1.getType();\n\t\t\t\t\tfinal /*@NonInvalid\052/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> conformsTo = type == null;\n\t\t\t\t\t/*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Boolean%> safe_conformsTo_source;\n\t\t\t\t\tif (conformsTo == Boolean.TRUE) {\n\t\t\t\t\t\tsafe_conformsTo_source = null;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>CollectionType%> referredCollectionType = this.getReferredCollectionType();\n\t\t\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Type%> elementType = referredCollectionType.getElementType();\n\t\t\t\t\t\tfinal /*@Thrown\052/ boolean conformsTo_0 = <%org.eclipse.ocl.pivot.library.classifier.OclTypeConformsToOperation%>.INSTANCE.evaluate(executor, type, elementType).booleanValue();\n\t\t\t\t\t\tsafe_conformsTo_source = conformsTo_0;\n\t\t\t\t\t}\n\t\t\t\t\tCAUGHT_safe_conformsTo_source = safe_conformsTo_source;\n\t\t\t\t}\n\t\t\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\t\t\tCAUGHT_safe_conformsTo_source = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t\t\t}\n\t\t\t\t//\n\t\t\t\tif (CAUGHT_safe_conformsTo_source == <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.FALSE_VALUE) {\t\t\t\t\t// Normal unsuccessful body evaluation result\n\t\t\t\t\tresult = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.FALSE_VALUE;\n\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Stop immediately\n\t\t\t\t}\n\t\t\t\telse if (CAUGHT_safe_conformsTo_source == <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE) {\t\t\t\t// Normal successful body evaluation result\n\t\t\t\t\t;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Carry on\n\t\t\t\t}\n\t\t\t\telse if (CAUGHT_safe_conformsTo_source == null) {\t\t\t\t\t\t\t\t// Abnormal null body evaluation result\n\t\t\t\t\tif (accumulator == <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE) {\n\t\t\t\t\t\taccumulator = null;\t\t\t\t\t\t\t\t\t\t// Cache a null failure\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (CAUGHT_safe_conformsTo_source instanceof <%org.eclipse.ocl.pivot.values.InvalidValueException%>) {\t\t// Abnormal exception evaluation result\n\t\t\t\t\taccumulator = CAUGHT_safe_conformsTo_source;\t\t\t\t\t\t\t\t\t// Cache an exception failure\n\t\t\t\t}\n\t\t\t\telse {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Impossible badly typed result\n\t\t\t\t\taccumulator = new <%org.eclipse.ocl.pivot.values.InvalidValueException%>(<%org.eclipse.ocl.pivot.messages.PivotMessages%>.NonBooleanBody, \"forAll\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tCAUGHT_result = result;\n\t\t}\n\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\tCAUGHT_result = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t}\n\t\tfinal /*@NonInvalid\052/ boolean logDiagnostic = <%org.eclipse.ocl.pivot.library.string.CGStringLogDiagnosticOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.ocl.pivot.ids.TypeId%>.BOOLEAN, constraintName, this, (Object)null, diagnostics, context, (Object)null, CAUGHT_severity_0, CAUGHT_result, <%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateTables%>.INT_0).booleanValue();\n\t\tsymbol_0 = logDiagnostic;\n\t}\n\treturn Boolean.TRUE == symbol_0;\n}\ncatch (<%java.lang.Throwable%> e) {\n\treturn <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.validationFailedDiagnostic(constraintName, this, diagnostics, context, e);\n}'" |
| * @generated |
| */ |
| boolean validateMemberTypeisCollectionElementType(DiagnosticChain diagnostics, Map<Object, Object> context); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @model annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='RestTypeisCollectionType'" |
| * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot body='\n\trest <> null implies\n\t\trest.type = referredCollectionType\n\n'" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel body='final <%java.lang.<%@<%org.eclipse.jdt.annotation.NonNull%> %>String%> constraintName = \"CollectionTemplateExp::RestTypeisCollectionType\";\ntry {\n\t/**\n\t *\n\t * inv RestTypeisCollectionType:\n\t * let severity : Integer[1] = constraintName.getSeverity()\n\t * in\n\t * if severity <= 0\n\t * then true\n\t * else\n\t * let result : Boolean[?] = rest <> null implies rest.type = referredCollectionType\n\t * in\n\t * constraintName.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)\n\t * endif\n\t \052/\n\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.evaluation.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Executor%> executor = <%org.eclipse.ocl.pivot.utilities.PivotUtil%>.getExecutor(this, context);\n\t/*@Caught\052/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> CAUGHT_severity_0;\n\ttry {\n\t\tfinal /*@Thrown\052/ <%org.eclipse.ocl.pivot.values.<%@<%org.eclipse.jdt.annotation.NonNull%> %>IntegerValue%> severity_0 = <%org.eclipse.ocl.pivot.library.string.CGStringGetSeverityOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplatePackage%>.Literals.COLLECTION_TEMPLATE_EXP___VALIDATE_REST_TYPEIS_COLLECTION_TYPE__DIAGNOSTICCHAIN_MAP);\n\t\tCAUGHT_severity_0 = severity_0;\n\t}\n\tcatch (<%java.lang.Exception%> e) {\n\t\tCAUGHT_severity_0 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t}\n\tif (CAUGHT_severity_0 instanceof <%org.eclipse.ocl.pivot.values.InvalidValueException%>) {\n\t\tthrow (<%org.eclipse.ocl.pivot.values.InvalidValueException%>)CAUGHT_severity_0;\n\t}\n\tfinal /*@Thrown\052/ boolean le = <%org.eclipse.ocl.pivot.library.oclany.OclComparableLessThanEqualOperation%>.INSTANCE.evaluate(executor, CAUGHT_severity_0, <%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateTables%>.INT_0).booleanValue();\n\t/*@NonInvalid\052/ boolean symbol_0;\n\tif (le) {\n\t\tsymbol_0 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t}\n\telse {\n\t\t/*@Caught\052/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> CAUGHT_result;\n\t\ttry {\n\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Variable%> rest = this.getRest();\n\t\t\tfinal /*@NonInvalid\052/ boolean ne = rest != null;\n\t\t\t/*@Thrown\052/ boolean result;\n\t\t\tif (ne) {\n\t\t\t\tif (rest == null) {\n\t\t\t\t\tthrow new <%org.eclipse.ocl.pivot.values.InvalidValueException%>(\"Null source for \\\'TypedElement::type\\\'\");\n\t\t\t\t}\n\t\t\t\tfinal /*@Thrown\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Type%> type = rest.getType();\n\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>CollectionType%> referredCollectionType = this.getReferredCollectionType();\n\t\t\t\tfinal /*@Thrown\052/ boolean eq = (type != null) ? (type.getTypeId() == referredCollectionType.getTypeId()) : false;\n\t\t\t\tresult = eq;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tresult = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t\t\t}\n\t\t\tCAUGHT_result = result;\n\t\t}\n\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\tCAUGHT_result = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t}\n\t\tfinal /*@NonInvalid\052/ boolean logDiagnostic = <%org.eclipse.ocl.pivot.library.string.CGStringLogDiagnosticOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.ocl.pivot.ids.TypeId%>.BOOLEAN, constraintName, this, (Object)null, diagnostics, context, (Object)null, CAUGHT_severity_0, CAUGHT_result, <%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateTables%>.INT_0).booleanValue();\n\t\tsymbol_0 = logDiagnostic;\n\t}\n\treturn Boolean.TRUE == symbol_0;\n}\ncatch (<%java.lang.Throwable%> e) {\n\treturn <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.validationFailedDiagnostic(constraintName, this, diagnostics, context, e);\n}'" |
| * @generated |
| */ |
| boolean validateRestTypeisCollectionType(DiagnosticChain diagnostics, Map<Object, Object> context); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @model annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='TypeisCollectionType'" |
| * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot body='\n\ttype = referredCollectionType\n\n'" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel body='final <%java.lang.<%@<%org.eclipse.jdt.annotation.NonNull%> %>String%> constraintName = \"CollectionTemplateExp::TypeisCollectionType\";\ntry {\n\t/**\n\t *\n\t * inv TypeisCollectionType:\n\t * let severity : Integer[1] = constraintName.getSeverity()\n\t * in\n\t * if severity <= 0\n\t * then true\n\t * else\n\t * let result : Boolean[1] = type = referredCollectionType\n\t * in\n\t * constraintName.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)\n\t * endif\n\t \052/\n\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.evaluation.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Executor%> executor = <%org.eclipse.ocl.pivot.utilities.PivotUtil%>.getExecutor(this, context);\n\t/*@Caught\052/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> CAUGHT_severity_0;\n\ttry {\n\t\tfinal /*@Thrown\052/ <%org.eclipse.ocl.pivot.values.<%@<%org.eclipse.jdt.annotation.NonNull%> %>IntegerValue%> severity_0 = <%org.eclipse.ocl.pivot.library.string.CGStringGetSeverityOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplatePackage%>.Literals.COLLECTION_TEMPLATE_EXP___VALIDATE_TYPEIS_COLLECTION_TYPE__DIAGNOSTICCHAIN_MAP);\n\t\tCAUGHT_severity_0 = severity_0;\n\t}\n\tcatch (<%java.lang.Exception%> e) {\n\t\tCAUGHT_severity_0 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t}\n\tif (CAUGHT_severity_0 instanceof <%org.eclipse.ocl.pivot.values.InvalidValueException%>) {\n\t\tthrow (<%org.eclipse.ocl.pivot.values.InvalidValueException%>)CAUGHT_severity_0;\n\t}\n\tfinal /*@Thrown\052/ boolean le = <%org.eclipse.ocl.pivot.library.oclany.OclComparableLessThanEqualOperation%>.INSTANCE.evaluate(executor, CAUGHT_severity_0, <%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateTables%>.INT_0).booleanValue();\n\t/*@NonInvalid\052/ boolean symbol_0;\n\tif (le) {\n\t\tsymbol_0 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t}\n\telse {\n\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Type%> type = this.getType();\n\t\t@SuppressWarnings(\"null\")\n\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>CollectionType%> referredCollectionType = this.getReferredCollectionType();\n\t\tfinal /*@NonInvalid\052/ boolean result = (type != null) ? (type.getTypeId() == referredCollectionType.getTypeId()) : false;\n\t\tfinal /*@NonInvalid\052/ boolean logDiagnostic = <%org.eclipse.ocl.pivot.library.string.CGStringLogDiagnosticOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.ocl.pivot.ids.TypeId%>.BOOLEAN, constraintName, this, (Object)null, diagnostics, context, (Object)null, CAUGHT_severity_0, result, <%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateTables%>.INT_0).booleanValue();\n\t\tsymbol_0 = logDiagnostic;\n\t}\n\treturn Boolean.TRUE == symbol_0;\n}\ncatch (<%java.lang.Throwable%> e) {\n\treturn <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.validationFailedDiagnostic(constraintName, this, diagnostics, context, e);\n}'" |
| * @generated |
| */ |
| boolean validateTypeisCollectionType(DiagnosticChain diagnostics, Map<Object, Object> context); |
| |
| } // CollectionTemplateExp |