| /******************************************************************************* |
| * Copyright (c) 2011, 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 |
| *******************************************************************************/ |
| package org.eclipse.qvtd.pivot.qvttemplate; |
| |
| import java.util.Map; |
| import org.eclipse.emf.common.util.DiagnosticChain; |
| import org.eclipse.ocl.pivot.Element; |
| import org.eclipse.ocl.pivot.OCLExpression; |
| import org.eclipse.ocl.pivot.Property; |
| import org.eclipse.ocl.pivot.ReferringElement; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * A representation of the model object '<em><b>Property Template Item</b></em>'. |
| * <!-- end-user-doc --> |
| * |
| * <p> |
| * The following features are supported: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.qvtd.pivot.qvttemplate.PropertyTemplateItem#getObjContainer <em>Obj Container</em>}</li> |
| * <li>{@link org.eclipse.qvtd.pivot.qvttemplate.PropertyTemplateItem#getReferredProperty <em>Referred Property</em>}</li> |
| * <li>{@link org.eclipse.qvtd.pivot.qvttemplate.PropertyTemplateItem#getValue <em>Value</em>}</li> |
| * <li>{@link org.eclipse.qvtd.pivot.qvttemplate.PropertyTemplateItem#isIsOpposite <em>Is Opposite</em>}</li> |
| * <li>{@link org.eclipse.qvtd.pivot.qvttemplate.PropertyTemplateItem#getResolvedProperty <em>Resolved Property</em>}</li> |
| * </ul> |
| * |
| * @see org.eclipse.qvtd.pivot.qvttemplate.QVTtemplatePackage#getPropertyTemplateItem() |
| * @model |
| * @generated |
| */ |
| public interface PropertyTemplateItem extends Element, ReferringElement { |
| /** |
| * Returns the value of the '<em><b>Obj Container</b></em>' container reference. |
| * It is bidirectional and its opposite is '{@link org.eclipse.qvtd.pivot.qvttemplate.ObjectTemplateExp#getPart <em>Part</em>}'. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of the '<em>Obj Container</em>' container reference isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @return the value of the '<em>Obj Container</em>' container reference. |
| * @see #setObjContainer(ObjectTemplateExp) |
| * @see org.eclipse.qvtd.pivot.qvttemplate.QVTtemplatePackage#getPropertyTemplateItem_ObjContainer() |
| * @see org.eclipse.qvtd.pivot.qvttemplate.ObjectTemplateExp#getPart |
| * @model opposite="part" required="true" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://www.eclipse.org/qvt/2015/QVTtemplate!PropertyTemplateItem!objContainer'" |
| * @generated |
| */ |
| ObjectTemplateExp getObjContainer(); |
| |
| /** |
| * Sets the value of the '{@link org.eclipse.qvtd.pivot.qvttemplate.PropertyTemplateItem#getObjContainer <em>Obj Container</em>}' container reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @param value the new value of the '<em>Obj Container</em>' container reference. |
| * @see #getObjContainer() |
| * @generated |
| */ |
| void setObjContainer(ObjectTemplateExp value); |
| |
| /** |
| * Returns the value of the '<em><b>Referred Property</b></em>' reference. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of the '<em>Referred Property</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 Property</em>' reference. |
| * @see #setReferredProperty(Property) |
| * @see org.eclipse.qvtd.pivot.qvttemplate.QVTtemplatePackage#getPropertyTemplateItem_ReferredProperty() |
| * @model required="true" |
| * annotation="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName body='propertyItem'" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://www.eclipse.org/qvt/2015/QVTtemplate!PropertyTemplateItem!referredProperty'" |
| * @generated |
| */ |
| Property getReferredProperty(); |
| |
| /** |
| * Sets the value of the '{@link org.eclipse.qvtd.pivot.qvttemplate.PropertyTemplateItem#getReferredProperty <em>Referred Property</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @param value the new value of the '<em>Referred Property</em>' reference. |
| * @see #getReferredProperty() |
| * @generated |
| */ |
| void setReferredProperty(Property value); |
| |
| /** |
| * Returns the value of the '<em><b>Value</b></em>' containment reference. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of the '<em>Value</em>' containment reference isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @return the value of the '<em>Value</em>' containment reference. |
| * @see #setValue(OCLExpression) |
| * @see org.eclipse.qvtd.pivot.qvttemplate.QVTtemplatePackage#getPropertyTemplateItem_Value() |
| * @model containment="true" required="true" |
| * annotation="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName body='propertyItem'" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://www.eclipse.org/qvt/2015/QVTtemplate!PropertyTemplateItem!value'" |
| * @generated |
| */ |
| OCLExpression getValue(); |
| |
| /** |
| * Sets the value of the '{@link org.eclipse.qvtd.pivot.qvttemplate.PropertyTemplateItem#getValue <em>Value</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @param value the new value of the '<em>Value</em>' containment reference. |
| * @see #getValue() |
| * @generated |
| */ |
| void setValue(OCLExpression value); |
| |
| /** |
| * Returns the value of the '<em><b>Is Opposite</b></em>' attribute. |
| * The default value is <code>"false"</code>. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of the '<em>Is Opposite</em>' attribute isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @return the value of the '<em>Is Opposite</em>' attribute. |
| * @see #setIsOpposite(boolean) |
| * @see org.eclipse.qvtd.pivot.qvttemplate.QVTtemplatePackage#getPropertyTemplateItem_IsOpposite() |
| * @model default="false" required="true" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://www.eclipse.org/qvt/2015/QVTtemplate!PropertyTemplateItem!isOpposite'" |
| * @generated |
| */ |
| boolean isIsOpposite(); |
| |
| /** |
| * Sets the value of the '{@link org.eclipse.qvtd.pivot.qvttemplate.PropertyTemplateItem#isIsOpposite <em>Is Opposite</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @param value the new value of the '<em>Is Opposite</em>' attribute. |
| * @see #isIsOpposite() |
| * @generated |
| */ |
| void setIsOpposite(boolean value); |
| |
| /** |
| * Returns the value of the '<em><b>Resolved Property</b></em>' reference. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of the '<em>Resolved Property</em>' reference isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @return the value of the '<em>Resolved Property</em>' reference. |
| * @see org.eclipse.qvtd.pivot.qvttemplate.QVTtemplatePackage#getPropertyTemplateItem_ResolvedProperty() |
| * @model resolveProxies="false" required="true" transient="true" changeable="false" volatile="true" derived="true" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel get='/**\n * if isOpposite then referredProperty.opposite else referredProperty endif\n \052/\n@SuppressWarnings(\"null\")\nfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Property%> referredProperty_0 = this.getReferredProperty();\nfinal /*@NonInvalid\052/ boolean isOpposite = this.isIsOpposite();\n/*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Property%> symbol_0;\nif (isOpposite) {\n\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Property%> opposite = referredProperty_0.getOpposite();\n\tsymbol_0 = opposite;\n}\nelse {\n\tsymbol_0 = referredProperty_0;\n}\nif (symbol_0 == null) {\n\tthrow new <%org.eclipse.ocl.pivot.values.InvalidValueException%>(\"Null body for \\\'qvttemplate::PropertyTemplateItem::resolvedProperty\\\'\");\n}\nreturn symbol_0;'" |
| * @generated |
| */ |
| Property getResolvedProperty(); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @model annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='CompatibleClassForProperty'" |
| * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot body='Tuple {\n\tmessage : String = objContainer.referredClass.name + \' must conform to \' + resolvedProperty.owningClass?.name,\n\tstatus : Boolean = \n\tobjContainer.referredClass.conformsTo(resolvedProperty.owningClass)\n\n\n}.status'" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel body='final <%java.lang.<%@<%org.eclipse.jdt.annotation.NonNull%> %>String%> constraintName = \"PropertyTemplateItem::CompatibleClassForProperty\";\ntry {\n\t/**\n\t *\n\t * inv CompatibleClassForProperty:\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 : OclAny[1] = let\n\t * status : Boolean[1] = objContainer.referredClass.conformsTo(resolvedProperty.owningClass)\n\t * in\n\t * if status = true\n\t * then true\n\t * else\n\t * Tuple{message = objContainer.referredClass.name + \' must conform to \' + resolvedProperty.owningClass?.name, status = status\n\t * }\n\t * endif\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.PROPERTY_TEMPLATE_ITEM___VALIDATE_COMPATIBLE_CLASS_FOR_PROPERTY__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/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> symbol_2;\n\tif (le) {\n\t\tsymbol_2 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t}\n\telse {\n\t\t/*@Caught\052/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> CAUGHT_symbol_1;\n\t\ttry {\n\t\t\t@SuppressWarnings(\"null\")\n\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.qvtd.pivot.qvttemplate.<%@<%org.eclipse.jdt.annotation.NonNull%> %>ObjectTemplateExp%> objContainer = this.getObjContainer();\n\t\t\t@SuppressWarnings(\"null\")\n\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Property%> resolvedProperty = this.getResolvedProperty();\n\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Class%> owningClass = resolvedProperty.getOwningClass();\n\t\t\t@SuppressWarnings(\"null\")\n\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Class%> referredClass = objContainer.getReferredClass();\n\t\t\tfinal /*@Thrown\052/ boolean status = <%org.eclipse.ocl.pivot.library.classifier.OclTypeConformsToOperation%>.INSTANCE.evaluate(executor, referredClass, owningClass).booleanValue();\n\t\t\t/*@Thrown\052/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> symbol_1;\n\t\t\tif (status) {\n\t\t\t\tsymbol_1 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfinal /*@NonInvalid\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.Nullable%> %>String%> name = referredClass.getName();\n\t\t\t\tfinal /*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.NonNull%> %>String%> sum = <%org.eclipse.ocl.pivot.library.string.StringConcatOperation%>.INSTANCE.evaluate(name, <%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateTables%>.STR__32_must_32_conform_32_to_32);\n\t\t\t\tfinal /*@NonInvalid\052/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> name_0 = owningClass == null;\n\t\t\t\t/*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.Nullable%> %>String%> safe_name_source;\n\t\t\t\tif (name_0 == Boolean.TRUE) {\n\t\t\t\t\tsafe_name_source = null;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tassert owningClass != null;\n\t\t\t\t\tfinal /*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.Nullable%> %>String%> name_1 = owningClass.getName();\n\t\t\t\t\tsafe_name_source = name_1;\n\t\t\t\t}\n\t\t\t\tfinal /*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.NonNull%> %>String%> sum_0 = <%org.eclipse.ocl.pivot.library.string.StringConcatOperation%>.INSTANCE.evaluate(sum, safe_name_source);\n\t\t\t\tfinal /*@Thrown\052/ <%org.eclipse.ocl.pivot.values.<%@<%org.eclipse.jdt.annotation.NonNull%> %>TupleValue%> symbol_0 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createTupleOfEach(<%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateTables%>.TUPLid_, sum_0, status);\n\t\t\t\tsymbol_1 = symbol_0;\n\t\t\t}\n\t\t\tCAUGHT_symbol_1 = symbol_1;\n\t\t}\n\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\tCAUGHT_symbol_1 = <%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_symbol_1, <%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateTables%>.INT_0).booleanValue();\n\t\tsymbol_2 = logDiagnostic;\n\t}\n\treturn Boolean.TRUE == symbol_2;\n}\ncatch (<%java.lang.Throwable%> e) {\n\treturn <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.validationFailedDiagnostic(constraintName, this, diagnostics, context, e);\n}'" |
| * @generated |
| */ |
| boolean validateCompatibleClassForProperty(DiagnosticChain diagnostics, Map<Object, Object> context); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @model annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='CompatibleTypeForObjectValue'" |
| * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot body='Tuple {\n\tmessage : String = value.type?.name + \' must conform to \' + resolvedProperty.type?.name + \' or vice-versa\',\n\tstatus : Boolean = \n\tnot resolvedProperty.type.oclIsKindOf(ocl::CollectionType) implies\n\t\tlet propertyType = resolvedProperty.type in\n\t\tlet valueType = value.type in\n\t\t\tvalueType?.conformsTo(propertyType)\n\t\t\tor propertyType?.conformsTo(valueType)\n\n\n}.status'" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel body='final <%java.lang.<%@<%org.eclipse.jdt.annotation.NonNull%> %>String%> constraintName = \"PropertyTemplateItem::CompatibleTypeForObjectValue\";\ntry {\n\t/**\n\t *\n\t * inv CompatibleTypeForObjectValue:\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 : OclAny[1] = let\n\t * status : Boolean[?] = not resolvedProperty.type.oclIsKindOf(CollectionType) implies\n\t * let propertyType : Type[?] = resolvedProperty.type\n\t * in\n\t * let valueType : Type[?] = value.type\n\t * in\n\t * valueType?.conformsTo(propertyType) or\n\t * propertyType?.conformsTo(valueType)\n\t * in\n\t * if status = true\n\t * then true\n\t * else\n\t * Tuple{message = value.type?.name + \' must conform to \' + resolvedProperty.type?.name + \' or vice-versa\', status = status\n\t * }\n\t * endif\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.PROPERTY_TEMPLATE_ITEM___VALIDATE_COMPATIBLE_TYPE_FOR_OBJECT_VALUE__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/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> symbol_2;\n\tif (le) {\n\t\tsymbol_2 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t}\n\telse {\n\t\t/*@Caught\052/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> CAUGHT_symbol_1;\n\t\ttry {\n\t\t\t/*@Caught\052/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> CAUGHT_oclIsKindOf;\n\t\t\ttry {\n\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Class%> TYP_CollectionType = idResolver.getClass(<%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateTables%>.CLSSid_CollectionType, null);\n\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Property%> resolvedProperty = this.getResolvedProperty();\n\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Type%> type = resolvedProperty.getType();\n\t\t\t\tfinal /*@Thrown\052/ boolean oclIsKindOf = <%org.eclipse.ocl.pivot.library.oclany.OclAnyOclIsKindOfOperation%>.INSTANCE.evaluate(executor, type, TYP_CollectionType).booleanValue();\n\t\t\t\tCAUGHT_oclIsKindOf = oclIsKindOf;\n\t\t\t}\n\t\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\t\tCAUGHT_oclIsKindOf = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t\t}\n\t\t\tfinal /*@NonInvalid\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Boolean%> not = <%org.eclipse.ocl.pivot.library.logical.BooleanNotOperation%>.INSTANCE.evaluate(CAUGHT_oclIsKindOf);\n\t\t\t/*@Caught\052/ <%<%@<%org.eclipse.jdt.annotation.Nullable%> %>Object%> CAUGHT_or;\n\t\t\ttry {\n\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Property%> resolvedProperty_0 = this.getResolvedProperty();\n\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Type%> propertyType = resolvedProperty_0.getType();\n\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>OCLExpression%> value = this.getValue();\n\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Type%> valueType = value.getType();\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.jdt.annotation.NonNull%> %>Object%> conformsTo = valueType == 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\tfinal /*@Thrown\052/ boolean conformsTo_0 = <%org.eclipse.ocl.pivot.library.classifier.OclTypeConformsToOperation%>.INSTANCE.evaluate(executor, valueType, propertyType).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/*@Caught\052/ <%<%@<%org.eclipse.jdt.annotation.Nullable%> %>Object%> CAUGHT_safe_conformsTo_source_0;\n\t\t\t\ttry {\n\t\t\t\t\tfinal /*@NonInvalid\052/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> conformsTo_1 = propertyType == null;\n\t\t\t\t\t/*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Boolean%> safe_conformsTo_source_0;\n\t\t\t\t\tif (conformsTo_1 == Boolean.TRUE) {\n\t\t\t\t\t\tsafe_conformsTo_source_0 = null;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tfinal /*@Thrown\052/ boolean conformsTo_2 = <%org.eclipse.ocl.pivot.library.classifier.OclTypeConformsToOperation%>.INSTANCE.evaluate(executor, propertyType, valueType).booleanValue();\n\t\t\t\t\t\tsafe_conformsTo_source_0 = conformsTo_2;\n\t\t\t\t\t}\n\t\t\t\t\tCAUGHT_safe_conformsTo_source_0 = safe_conformsTo_source_0;\n\t\t\t\t}\n\t\t\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\t\t\tCAUGHT_safe_conformsTo_source_0 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t\t\t}\n\t\t\t\tfinal /*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Boolean%> or = <%org.eclipse.ocl.pivot.library.logical.BooleanOrOperation%>.INSTANCE.evaluate(CAUGHT_safe_conformsTo_source, CAUGHT_safe_conformsTo_source_0);\n\t\t\t\tCAUGHT_or = or;\n\t\t\t}\n\t\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\t\tCAUGHT_or = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t\t}\n\t\t\tfinal /*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Boolean%> status = <%org.eclipse.ocl.pivot.library.logical.BooleanImpliesOperation%>.INSTANCE.evaluate(not, CAUGHT_or);\n\t\t\tfinal /*@Thrown\052/ boolean eq = status == Boolean.TRUE;\n\t\t\t/*@Thrown\052/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> symbol_1;\n\t\t\tif (eq) {\n\t\t\t\tsymbol_1 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>OCLExpression%> value_0 = this.getValue();\n\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Type%> type_0 = value_0.getType();\n\t\t\t\tfinal /*@NonInvalid\052/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> name = type_0 == null;\n\t\t\t\t/*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.Nullable%> %>String%> safe_name_source;\n\t\t\t\tif (name == Boolean.TRUE) {\n\t\t\t\t\tsafe_name_source = null;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tassert type_0 != null;\n\t\t\t\t\tfinal /*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.Nullable%> %>String%> name_0 = type_0.getName();\n\t\t\t\t\tsafe_name_source = name_0;\n\t\t\t\t}\n\t\t\t\tfinal /*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.NonNull%> %>String%> sum = <%org.eclipse.ocl.pivot.library.string.StringConcatOperation%>.INSTANCE.evaluate(safe_name_source, <%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateTables%>.STR__32_must_32_conform_32_to_32);\n\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Property%> resolvedProperty_1 = this.getResolvedProperty();\n\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Type%> type_1 = resolvedProperty_1.getType();\n\t\t\t\tfinal /*@NonInvalid\052/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> name_1 = type_1 == null;\n\t\t\t\t/*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.Nullable%> %>String%> safe_name_source_0;\n\t\t\t\tif (name_1 == Boolean.TRUE) {\n\t\t\t\t\tsafe_name_source_0 = null;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tassert type_1 != null;\n\t\t\t\t\tfinal /*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.Nullable%> %>String%> name_2 = type_1.getName();\n\t\t\t\t\tsafe_name_source_0 = name_2;\n\t\t\t\t}\n\t\t\t\tfinal /*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.NonNull%> %>String%> sum_0 = <%org.eclipse.ocl.pivot.library.string.StringConcatOperation%>.INSTANCE.evaluate(sum, safe_name_source_0);\n\t\t\t\tfinal /*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.NonNull%> %>String%> sum_1 = <%org.eclipse.ocl.pivot.library.string.StringConcatOperation%>.INSTANCE.evaluate(sum_0, <%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateTables%>.STR__32_or_32_vice_m_versa);\n\t\t\t\tfinal /*@Thrown\052/ <%org.eclipse.ocl.pivot.values.<%@<%org.eclipse.jdt.annotation.NonNull%> %>TupleValue%> symbol_0 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createTupleOfEach(<%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateTables%>.TUPLid_, sum_1, status);\n\t\t\t\tsymbol_1 = symbol_0;\n\t\t\t}\n\t\t\tCAUGHT_symbol_1 = symbol_1;\n\t\t}\n\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\tCAUGHT_symbol_1 = <%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_symbol_1, <%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateTables%>.INT_0).booleanValue();\n\t\tsymbol_2 = logDiagnostic;\n\t}\n\treturn Boolean.TRUE == symbol_2;\n}\ncatch (<%java.lang.Throwable%> e) {\n\treturn <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.validationFailedDiagnostic(constraintName, this, diagnostics, context, e);\n}'" |
| * @generated |
| */ |
| boolean validateCompatibleTypeForObjectValue(DiagnosticChain diagnostics, Map<Object, Object> context); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @model annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='CompatibleTypeForCollectionElementValue'" |
| * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot body='Tuple {\n\tmessage : String = value.type?.name + \' must conform to \' + resolvedProperty.type.oclAsType(ocl::CollectionType).elementType.name + \' or vice-versa\',\n\tstatus : Boolean = \n\tresolvedProperty.type.oclIsKindOf(ocl::CollectionType)\n\tand not value.type.oclIsKindOf(ocl::CollectionType) implies\n\t\tlet propertyType = resolvedProperty.type.oclAsType(ocl::CollectionType).elementType in\n\t\tlet valueType = value.type in\n\t\t\tvalueType?.conformsTo(propertyType)\n\t\t\tor propertyType.conformsTo(valueType)\n\n\n}.status'" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel body='final <%java.lang.<%@<%org.eclipse.jdt.annotation.NonNull%> %>String%> constraintName = \"PropertyTemplateItem::CompatibleTypeForCollectionElementValue\";\ntry {\n\t/**\n\t *\n\t * inv CompatibleTypeForCollectionElementValue:\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 : OclAny[1] = let\n\t * status : Boolean[?] = resolvedProperty.type.oclIsKindOf(CollectionType) and\n\t * not value.type.oclIsKindOf(CollectionType) implies\n\t * let\n\t * propertyType : Type[1] = resolvedProperty.type.oclAsType(CollectionType).elementType\n\t * in\n\t * let valueType : Type[?] = value.type\n\t * in\n\t * valueType?.conformsTo(propertyType) or\n\t * propertyType.conformsTo(valueType)\n\t * in\n\t * if status = true\n\t * then true\n\t * else\n\t * Tuple{message = value.type?.name + \' must conform to \' +\n\t * resolvedProperty.type.oclAsType(CollectionType).elementType.name + \' or vice-versa\', status = status\n\t * }\n\t * endif\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.PROPERTY_TEMPLATE_ITEM___VALIDATE_COMPATIBLE_TYPE_FOR_COLLECTION_ELEMENT_VALUE__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/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> symbol_2;\n\tif (le) {\n\t\tsymbol_2 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t}\n\telse {\n\t\t/*@Caught\052/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> CAUGHT_symbol_1;\n\t\ttry {\n\t\t\t/*@Caught\052/ <%<%@<%org.eclipse.jdt.annotation.Nullable%> %>Object%> CAUGHT_and;\n\t\t\ttry {\n\t\t\t\t/*@Caught\052/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> CAUGHT_oclIsKindOf;\n\t\t\t\ttry {\n\t\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Class%> TYP_CollectionType_0 = idResolver.getClass(<%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateTables%>.CLSSid_CollectionType, null);\n\t\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Property%> resolvedProperty = this.getResolvedProperty();\n\t\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Type%> type = resolvedProperty.getType();\n\t\t\t\t\tfinal /*@Thrown\052/ boolean oclIsKindOf = <%org.eclipse.ocl.pivot.library.oclany.OclAnyOclIsKindOfOperation%>.INSTANCE.evaluate(executor, type, TYP_CollectionType_0).booleanValue();\n\t\t\t\t\tCAUGHT_oclIsKindOf = oclIsKindOf;\n\t\t\t\t}\n\t\t\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\t\t\tCAUGHT_oclIsKindOf = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t\t\t}\n\t\t\t\t/*@Caught\052/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> CAUGHT_oclIsKindOf_0;\n\t\t\t\ttry {\n\t\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Class%> TYP_CollectionType_1 = idResolver.getClass(<%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateTables%>.CLSSid_CollectionType, null);\n\t\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>OCLExpression%> value = this.getValue();\n\t\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Type%> type_0 = value.getType();\n\t\t\t\t\tfinal /*@Thrown\052/ boolean oclIsKindOf_0 = <%org.eclipse.ocl.pivot.library.oclany.OclAnyOclIsKindOfOperation%>.INSTANCE.evaluate(executor, type_0, TYP_CollectionType_1).booleanValue();\n\t\t\t\t\tCAUGHT_oclIsKindOf_0 = oclIsKindOf_0;\n\t\t\t\t}\n\t\t\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\t\t\tCAUGHT_oclIsKindOf_0 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t\t\t}\n\t\t\t\tfinal /*@NonInvalid\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Boolean%> not = <%org.eclipse.ocl.pivot.library.logical.BooleanNotOperation%>.INSTANCE.evaluate(CAUGHT_oclIsKindOf_0);\n\t\t\t\tfinal /*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Boolean%> and = <%org.eclipse.ocl.pivot.library.logical.BooleanAndOperation%>.INSTANCE.evaluate(CAUGHT_oclIsKindOf, not);\n\t\t\t\tCAUGHT_and = and;\n\t\t\t}\n\t\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\t\tCAUGHT_and = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t\t}\n\t\t\t/*@Caught\052/ <%<%@<%org.eclipse.jdt.annotation.Nullable%> %>Object%> CAUGHT_or;\n\t\t\ttry {\n\t\t\t\t/*@Caught\052/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> CAUGHT_propertyType;\n\t\t\t\ttry {\n\t\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Class%> TYP_CollectionType_2 = idResolver.getClass(<%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateTables%>.CLSSid_CollectionType, null);\n\t\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Property%> resolvedProperty_0 = this.getResolvedProperty();\n\t\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Type%> type_1 = resolvedProperty_0.getType();\n\t\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\t\tfinal /*@Thrown\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>CollectionType%> oclAsType = (<%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>CollectionType%>)<%org.eclipse.ocl.pivot.library.oclany.OclAnyOclAsTypeOperation%>.INSTANCE.evaluate(executor, type_1, TYP_CollectionType_2);\n\t\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\t\tfinal /*@Thrown\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Type%> propertyType = oclAsType.getElementType();\n\t\t\t\t\tCAUGHT_propertyType = propertyType;\n\t\t\t\t}\n\t\t\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\t\t\tCAUGHT_propertyType = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t\t\t}\n\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>OCLExpression%> value_0 = this.getValue();\n\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Type%> valueType = value_0.getType();\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.jdt.annotation.NonNull%> %>Object%> conformsTo = valueType == 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\tif (CAUGHT_propertyType instanceof <%org.eclipse.ocl.pivot.values.InvalidValueException%>) {\n\t\t\t\t\t\t\tthrow (<%org.eclipse.ocl.pivot.values.InvalidValueException%>)CAUGHT_propertyType;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfinal /*@Thrown\052/ boolean conformsTo_0 = <%org.eclipse.ocl.pivot.library.classifier.OclTypeConformsToOperation%>.INSTANCE.evaluate(executor, valueType, CAUGHT_propertyType).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/*@Caught\052/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> CAUGHT_conformsTo_1;\n\t\t\t\ttry {\n\t\t\t\t\tif (CAUGHT_propertyType instanceof <%org.eclipse.ocl.pivot.values.InvalidValueException%>) {\n\t\t\t\t\t\tthrow (<%org.eclipse.ocl.pivot.values.InvalidValueException%>)CAUGHT_propertyType;\n\t\t\t\t\t}\n\t\t\t\t\tfinal /*@Thrown\052/ boolean conformsTo_1 = <%org.eclipse.ocl.pivot.library.classifier.OclTypeConformsToOperation%>.INSTANCE.evaluate(executor, CAUGHT_propertyType, valueType).booleanValue();\n\t\t\t\t\tCAUGHT_conformsTo_1 = conformsTo_1;\n\t\t\t\t}\n\t\t\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\t\t\tCAUGHT_conformsTo_1 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t\t\t}\n\t\t\t\tfinal /*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Boolean%> or = <%org.eclipse.ocl.pivot.library.logical.BooleanOrOperation%>.INSTANCE.evaluate(CAUGHT_safe_conformsTo_source, CAUGHT_conformsTo_1);\n\t\t\t\tCAUGHT_or = or;\n\t\t\t}\n\t\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\t\tCAUGHT_or = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t\t}\n\t\t\tfinal /*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Boolean%> status = <%org.eclipse.ocl.pivot.library.logical.BooleanImpliesOperation%>.INSTANCE.evaluate(CAUGHT_and, CAUGHT_or);\n\t\t\tfinal /*@Thrown\052/ boolean eq = status == Boolean.TRUE;\n\t\t\t/*@Thrown\052/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> symbol_1;\n\t\t\tif (eq) {\n\t\t\t\tsymbol_1 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Class%> TYP_CollectionType_3 = idResolver.getClass(<%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateTables%>.CLSSid_CollectionType, null);\n\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>OCLExpression%> value_1 = this.getValue();\n\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Type%> type_2 = value_1.getType();\n\t\t\t\tfinal /*@NonInvalid\052/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> name = type_2 == null;\n\t\t\t\t/*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.Nullable%> %>String%> safe_name_source;\n\t\t\t\tif (name == Boolean.TRUE) {\n\t\t\t\t\tsafe_name_source = null;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tassert type_2 != null;\n\t\t\t\t\tfinal /*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.Nullable%> %>String%> name_0 = type_2.getName();\n\t\t\t\t\tsafe_name_source = name_0;\n\t\t\t\t}\n\t\t\t\tfinal /*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.NonNull%> %>String%> sum = <%org.eclipse.ocl.pivot.library.string.StringConcatOperation%>.INSTANCE.evaluate(safe_name_source, <%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateTables%>.STR__32_must_32_conform_32_to_32);\n\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Property%> resolvedProperty_1 = this.getResolvedProperty();\n\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Type%> type_3 = resolvedProperty_1.getType();\n\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\tfinal /*@Thrown\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>CollectionType%> oclAsType_0 = (<%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>CollectionType%>)<%org.eclipse.ocl.pivot.library.oclany.OclAnyOclAsTypeOperation%>.INSTANCE.evaluate(executor, type_3, TYP_CollectionType_3);\n\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\tfinal /*@Thrown\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Type%> elementType = oclAsType_0.getElementType();\n\t\t\t\tfinal /*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.Nullable%> %>String%> name_1 = elementType.getName();\n\t\t\t\tfinal /*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.NonNull%> %>String%> sum_0 = <%org.eclipse.ocl.pivot.library.string.StringConcatOperation%>.INSTANCE.evaluate(sum, name_1);\n\t\t\t\tfinal /*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.NonNull%> %>String%> sum_1 = <%org.eclipse.ocl.pivot.library.string.StringConcatOperation%>.INSTANCE.evaluate(sum_0, <%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateTables%>.STR__32_or_32_vice_m_versa);\n\t\t\t\tfinal /*@Thrown\052/ <%org.eclipse.ocl.pivot.values.<%@<%org.eclipse.jdt.annotation.NonNull%> %>TupleValue%> symbol_0 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createTupleOfEach(<%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateTables%>.TUPLid_, sum_1, status);\n\t\t\t\tsymbol_1 = symbol_0;\n\t\t\t}\n\t\t\tCAUGHT_symbol_1 = symbol_1;\n\t\t}\n\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\tCAUGHT_symbol_1 = <%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_symbol_1, <%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateTables%>.INT_0).booleanValue();\n\t\tsymbol_2 = logDiagnostic;\n\t}\n\treturn Boolean.TRUE == symbol_2;\n}\ncatch (<%java.lang.Throwable%> e) {\n\treturn <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.validationFailedDiagnostic(constraintName, this, diagnostics, context, e);\n}'" |
| * @generated |
| */ |
| boolean validateCompatibleTypeForCollectionElementValue(DiagnosticChain diagnostics, Map<Object, Object> context); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @model annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='CompatibleTypeForCollectionValue'" |
| * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot body='Tuple {\n\tmessage : String = value.type.oclAsType(ocl::CollectionType).elementType.name + \' must conform to \' + resolvedProperty.type.oclAsType(ocl::CollectionType).elementType.name + \' or vice-versa\',\n\tstatus : Boolean = \n\tresolvedProperty.type.oclIsKindOf(ocl::CollectionType)\n\tand value.type.oclIsKindOf(ocl::CollectionType) implies\n\t\tlet propertyType = resolvedProperty.type.oclAsType(ocl::CollectionType).elementType in\n\t\tlet valueType = value.type.oclAsType(ocl::CollectionType).elementType in\n--\t\tTuple {\n--\t\t\tmessage : String = valueType.conformsTo(propertyType) or propertyType.conformsTo(valueType),\n\t\t\t/*status : Boolean =\052/ valueType.conformsTo(propertyType) or propertyType.conformsTo(valueType)\n\n}.status'" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel body='final <%java.lang.<%@<%org.eclipse.jdt.annotation.NonNull%> %>String%> constraintName = \"PropertyTemplateItem::CompatibleTypeForCollectionValue\";\ntry {\n\t/**\n\t *\n\t * inv CompatibleTypeForCollectionValue:\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 : OclAny[1] = let\n\t * status : Boolean[?] = resolvedProperty.type.oclIsKindOf(CollectionType) and\n\t * value.type.oclIsKindOf(CollectionType) implies\n\t * let\n\t * propertyType : Type[1] = resolvedProperty.type.oclAsType(CollectionType).elementType\n\t * in\n\t * let\n\t * valueType : Type[1] = value.type.oclAsType(CollectionType).elementType\n\t * in\n\t * valueType.conformsTo(propertyType) or\n\t * propertyType.conformsTo(valueType)\n\t * in\n\t * if status = true\n\t * then true\n\t * else\n\t * Tuple{\n\t * message = value.type.oclAsType(CollectionType).elementType.name + \' must conform to \' +\n\t * resolvedProperty.type.oclAsType(CollectionType).elementType.name + \' or vice-versa\', status = status\n\t * }\n\t * endif\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.PROPERTY_TEMPLATE_ITEM___VALIDATE_COMPATIBLE_TYPE_FOR_COLLECTION_VALUE__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/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> symbol_2;\n\tif (le) {\n\t\tsymbol_2 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t}\n\telse {\n\t\t/*@Caught\052/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> CAUGHT_symbol_1;\n\t\ttry {\n\t\t\t/*@Caught\052/ <%<%@<%org.eclipse.jdt.annotation.Nullable%> %>Object%> CAUGHT_and;\n\t\t\ttry {\n\t\t\t\t/*@Caught\052/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> CAUGHT_oclIsKindOf;\n\t\t\t\ttry {\n\t\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Class%> TYP_CollectionType_0 = idResolver.getClass(<%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateTables%>.CLSSid_CollectionType, null);\n\t\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Property%> resolvedProperty = this.getResolvedProperty();\n\t\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Type%> type = resolvedProperty.getType();\n\t\t\t\t\tfinal /*@Thrown\052/ boolean oclIsKindOf = <%org.eclipse.ocl.pivot.library.oclany.OclAnyOclIsKindOfOperation%>.INSTANCE.evaluate(executor, type, TYP_CollectionType_0).booleanValue();\n\t\t\t\t\tCAUGHT_oclIsKindOf = oclIsKindOf;\n\t\t\t\t}\n\t\t\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\t\t\tCAUGHT_oclIsKindOf = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t\t\t}\n\t\t\t\t/*@Caught\052/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> CAUGHT_oclIsKindOf_0;\n\t\t\t\ttry {\n\t\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Class%> TYP_CollectionType_1 = idResolver.getClass(<%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateTables%>.CLSSid_CollectionType, null);\n\t\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>OCLExpression%> value = this.getValue();\n\t\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Type%> type_0 = value.getType();\n\t\t\t\t\tfinal /*@Thrown\052/ boolean oclIsKindOf_0 = <%org.eclipse.ocl.pivot.library.oclany.OclAnyOclIsKindOfOperation%>.INSTANCE.evaluate(executor, type_0, TYP_CollectionType_1).booleanValue();\n\t\t\t\t\tCAUGHT_oclIsKindOf_0 = oclIsKindOf_0;\n\t\t\t\t}\n\t\t\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\t\t\tCAUGHT_oclIsKindOf_0 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t\t\t}\n\t\t\t\tfinal /*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Boolean%> and = <%org.eclipse.ocl.pivot.library.logical.BooleanAndOperation%>.INSTANCE.evaluate(CAUGHT_oclIsKindOf, CAUGHT_oclIsKindOf_0);\n\t\t\t\tCAUGHT_and = and;\n\t\t\t}\n\t\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\t\tCAUGHT_and = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t\t}\n\t\t\t/*@Caught\052/ <%<%@<%org.eclipse.jdt.annotation.Nullable%> %>Object%> CAUGHT_or;\n\t\t\ttry {\n\t\t\t\t/*@Caught\052/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> CAUGHT_propertyType;\n\t\t\t\ttry {\n\t\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Class%> TYP_CollectionType_2 = idResolver.getClass(<%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateTables%>.CLSSid_CollectionType, null);\n\t\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Property%> resolvedProperty_0 = this.getResolvedProperty();\n\t\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Type%> type_1 = resolvedProperty_0.getType();\n\t\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\t\tfinal /*@Thrown\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>CollectionType%> oclAsType = (<%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>CollectionType%>)<%org.eclipse.ocl.pivot.library.oclany.OclAnyOclAsTypeOperation%>.INSTANCE.evaluate(executor, type_1, TYP_CollectionType_2);\n\t\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\t\tfinal /*@Thrown\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Type%> propertyType = oclAsType.getElementType();\n\t\t\t\t\tCAUGHT_propertyType = propertyType;\n\t\t\t\t}\n\t\t\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\t\t\tCAUGHT_propertyType = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t\t\t}\n\t\t\t\t/*@Caught\052/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> CAUGHT_valueType;\n\t\t\t\ttry {\n\t\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Class%> TYP_CollectionType_3 = idResolver.getClass(<%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateTables%>.CLSSid_CollectionType, null);\n\t\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>OCLExpression%> value_0 = this.getValue();\n\t\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Type%> type_2 = value_0.getType();\n\t\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\t\tfinal /*@Thrown\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>CollectionType%> oclAsType_0 = (<%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>CollectionType%>)<%org.eclipse.ocl.pivot.library.oclany.OclAnyOclAsTypeOperation%>.INSTANCE.evaluate(executor, type_2, TYP_CollectionType_3);\n\t\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\t\tfinal /*@Thrown\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Type%> valueType = oclAsType_0.getElementType();\n\t\t\t\t\tCAUGHT_valueType = valueType;\n\t\t\t\t}\n\t\t\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\t\t\tCAUGHT_valueType = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t\t\t}\n\t\t\t\t/*@Caught\052/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> CAUGHT_conformsTo;\n\t\t\t\ttry {\n\t\t\t\t\tif (CAUGHT_valueType instanceof <%org.eclipse.ocl.pivot.values.InvalidValueException%>) {\n\t\t\t\t\t\tthrow (<%org.eclipse.ocl.pivot.values.InvalidValueException%>)CAUGHT_valueType;\n\t\t\t\t\t}\n\t\t\t\t\tif (CAUGHT_propertyType instanceof <%org.eclipse.ocl.pivot.values.InvalidValueException%>) {\n\t\t\t\t\t\tthrow (<%org.eclipse.ocl.pivot.values.InvalidValueException%>)CAUGHT_propertyType;\n\t\t\t\t\t}\n\t\t\t\t\tfinal /*@Thrown\052/ boolean conformsTo = <%org.eclipse.ocl.pivot.library.classifier.OclTypeConformsToOperation%>.INSTANCE.evaluate(executor, CAUGHT_valueType, CAUGHT_propertyType).booleanValue();\n\t\t\t\t\tCAUGHT_conformsTo = conformsTo;\n\t\t\t\t}\n\t\t\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\t\t\tCAUGHT_conformsTo = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t\t\t}\n\t\t\t\t/*@Caught\052/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> CAUGHT_conformsTo_0;\n\t\t\t\ttry {\n\t\t\t\t\tif (CAUGHT_propertyType instanceof <%org.eclipse.ocl.pivot.values.InvalidValueException%>) {\n\t\t\t\t\t\tthrow (<%org.eclipse.ocl.pivot.values.InvalidValueException%>)CAUGHT_propertyType;\n\t\t\t\t\t}\n\t\t\t\t\tif (CAUGHT_valueType instanceof <%org.eclipse.ocl.pivot.values.InvalidValueException%>) {\n\t\t\t\t\t\tthrow (<%org.eclipse.ocl.pivot.values.InvalidValueException%>)CAUGHT_valueType;\n\t\t\t\t\t}\n\t\t\t\t\tfinal /*@Thrown\052/ boolean conformsTo_0 = <%org.eclipse.ocl.pivot.library.classifier.OclTypeConformsToOperation%>.INSTANCE.evaluate(executor, CAUGHT_propertyType, CAUGHT_valueType).booleanValue();\n\t\t\t\t\tCAUGHT_conformsTo_0 = conformsTo_0;\n\t\t\t\t}\n\t\t\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\t\t\tCAUGHT_conformsTo_0 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t\t\t}\n\t\t\t\tfinal /*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Boolean%> or = <%org.eclipse.ocl.pivot.library.logical.BooleanOrOperation%>.INSTANCE.evaluate(CAUGHT_conformsTo, CAUGHT_conformsTo_0);\n\t\t\t\tCAUGHT_or = or;\n\t\t\t}\n\t\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\t\tCAUGHT_or = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t\t}\n\t\t\tfinal /*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Boolean%> status = <%org.eclipse.ocl.pivot.library.logical.BooleanImpliesOperation%>.INSTANCE.evaluate(CAUGHT_and, CAUGHT_or);\n\t\t\tfinal /*@Thrown\052/ boolean eq = status == Boolean.TRUE;\n\t\t\t/*@Thrown\052/ <%<%@<%org.eclipse.jdt.annotation.NonNull%> %>Object%> symbol_1;\n\t\t\tif (eq) {\n\t\t\t\tsymbol_1 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Class%> TYP_CollectionType_5 = idResolver.getClass(<%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateTables%>.CLSSid_CollectionType, null);\n\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>OCLExpression%> value_1 = this.getValue();\n\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Type%> type_3 = value_1.getType();\n\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\tfinal /*@Thrown\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>CollectionType%> oclAsType_1 = (<%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>CollectionType%>)<%org.eclipse.ocl.pivot.library.oclany.OclAnyOclAsTypeOperation%>.INSTANCE.evaluate(executor, type_3, TYP_CollectionType_5);\n\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\tfinal /*@Thrown\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Type%> elementType = oclAsType_1.getElementType();\n\t\t\t\tfinal /*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.Nullable%> %>String%> name = elementType.getName();\n\t\t\t\tfinal /*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.NonNull%> %>String%> sum = <%org.eclipse.ocl.pivot.library.string.StringConcatOperation%>.INSTANCE.evaluate(name, <%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateTables%>.STR__32_must_32_conform_32_to_32);\n\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Property%> resolvedProperty_1 = this.getResolvedProperty();\n\t\t\t\tfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.Nullable%> %>Type%> type_4 = resolvedProperty_1.getType();\n\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\tfinal /*@Thrown\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>CollectionType%> oclAsType_2 = (<%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>CollectionType%>)<%org.eclipse.ocl.pivot.library.oclany.OclAnyOclAsTypeOperation%>.INSTANCE.evaluate(executor, type_4, TYP_CollectionType_5);\n\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\tfinal /*@Thrown\052/ <%org.eclipse.ocl.pivot.<%@<%org.eclipse.jdt.annotation.NonNull%> %>Type%> elementType_0 = oclAsType_2.getElementType();\n\t\t\t\tfinal /*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.Nullable%> %>String%> name_0 = elementType_0.getName();\n\t\t\t\tfinal /*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.NonNull%> %>String%> sum_0 = <%org.eclipse.ocl.pivot.library.string.StringConcatOperation%>.INSTANCE.evaluate(sum, name_0);\n\t\t\t\tfinal /*@Thrown\052/ <%java.lang.<%@<%org.eclipse.jdt.annotation.NonNull%> %>String%> sum_1 = <%org.eclipse.ocl.pivot.library.string.StringConcatOperation%>.INSTANCE.evaluate(sum_0, <%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateTables%>.STR__32_or_32_vice_m_versa);\n\t\t\t\tfinal /*@Thrown\052/ <%org.eclipse.ocl.pivot.values.<%@<%org.eclipse.jdt.annotation.NonNull%> %>TupleValue%> symbol_0 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createTupleOfEach(<%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateTables%>.TUPLid_, sum_1, status);\n\t\t\t\tsymbol_1 = symbol_0;\n\t\t\t}\n\t\t\tCAUGHT_symbol_1 = symbol_1;\n\t\t}\n\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\tCAUGHT_symbol_1 = <%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_symbol_1, <%org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateTables%>.INT_0).booleanValue();\n\t\tsymbol_2 = logDiagnostic;\n\t}\n\treturn Boolean.TRUE == symbol_2;\n}\ncatch (<%java.lang.Throwable%> e) {\n\treturn <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.validationFailedDiagnostic(constraintName, this, diagnostics, context, e);\n}'" |
| * @generated |
| */ |
| boolean validateCompatibleTypeForCollectionValue(DiagnosticChain diagnostics, Map<Object, Object> context); |
| |
| } // PropertyTemplateItem |