| /** |
| * <copyright> |
| * |
| * Copyright (c) 2013, 2017 Willink Transformations and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.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.Property; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * A representation of the model object '<em><b>Property Assignment</b></em>'. |
| * <!-- end-user-doc --> |
| * |
| * <p> |
| * The following features are supported: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.qvtd.pivot.qvtcore.PropertyAssignment#getTargetProperty <em>Target Property</em>}</li> |
| * </ul> |
| * |
| * @see org.eclipse.qvtd.pivot.qvtcore.QVTcorePackage#getPropertyAssignment() |
| * @model |
| * @generated |
| */ |
| public interface PropertyAssignment extends NavigationAssignment { |
| /** |
| * Returns the value of the '<em><b>Target Property</b></em>' reference. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of the '<em>Target 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>Target Property</em>' reference. |
| * @see #setTargetProperty(Property) |
| * @see org.eclipse.qvtd.pivot.qvtcore.QVTcorePackage#getPropertyAssignment_TargetProperty() |
| * @model required="true" |
| * annotation="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName body='assignment'" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://www.eclipse.org/qvt/2017/QVTcore!PropertyAssignment!targetProperty'" |
| * @generated |
| */ |
| Property getTargetProperty(); |
| |
| /** |
| * Sets the value of the '{@link org.eclipse.qvtd.pivot.qvtcore.PropertyAssignment#getTargetProperty <em>Target Property</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @param value the new value of the '<em>Target Property</em>' reference. |
| * @see #getTargetProperty() |
| * @generated |
| */ |
| void setTargetProperty(Property value); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @model kind="operation" required="true" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel body='/**\n * targetProperty\n \052/\n@SuppressWarnings(\"null\")\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.@<%org.eclipse.jdt.annotation.NonNull%> Property targetProperty = this.getTargetProperty();\nreturn targetProperty;'" |
| * @generated |
| */ |
| Property getReferredTargetProperty(); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @model annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='CompatibleTypeForPartialValue'" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel body='/**\n *\n * inv CompatibleTypeForPartialValue:\n * let\n * severity : Integer[1] = \'PropertyAssignment::CompatibleTypeForPartialValue\'.getSeverity()\n * in\n * if severity <= 0\n * then true\n * else\n * let\n * result : OclAny[1] = if isPartial\n * then\n * let\n * propertyType : Type[1] = getReferredTargetProperty()\n * .type.oclAsType(CollectionType).elementType\n * in\n * let valueType : Type[?] = value.type\n * in\n * let\n * status : Boolean[?] = valueType.conformsTo(propertyType) or\n * propertyType.conformsTo(valueType)\n * in\n * if status = true\n * then true\n * else\n * Tuple{status = status, message = \'PropertyAssignment::CompatibleTypeForPartialValue: \' + valueType?.name + \' must conform to \' + propertyType.name + \' or vice-versa\'\n * }\n * endif\n * else true\n * endif\n * in\n * \'PropertyAssignment::CompatibleTypeForPartialValue\'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)\n * endif\n \052/\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.evaluation.@<%org.eclipse.jdt.annotation.NonNull%> Executor executor = <%org.eclipse.ocl.pivot.internal.utilities.PivotUtilInternal%>.getExecutor(this);\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.ids.@<%org.eclipse.jdt.annotation.NonNull%> IdResolver idResolver = executor.getIdResolver();\nfinal /*@NonInvalid\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.qvtcore.QVTcoreTables%>.STR_PropertyAssignment_c_c_CompatibleTypeForPartialValue);\nfinal /*@NonInvalid\052/ boolean le = <%org.eclipse.ocl.pivot.library.oclany.OclComparableLessThanEqualOperation%>.INSTANCE.evaluate(executor, severity_0, <%org.eclipse.qvtd.pivot.qvtcore.QVTcoreTables%>.INT_0).booleanValue();\n/*@NonInvalid\052/ java.lang.@<%org.eclipse.jdt.annotation.NonNull%> Object symbol_4;\nif (le) {\n\tsymbol_4 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n}\nelse {\n\t/*@Caught\052/ @<%org.eclipse.jdt.annotation.NonNull%> <%java.lang.Object%> CAUGHT_result;\n\ttry {\n\t\tfinal /*@NonInvalid\052/ boolean isPartial = this.isIsPartial();\n\t\t/*@Thrown\052/ java.lang.@<%org.eclipse.jdt.annotation.NonNull%> Object result;\n\t\tif (isPartial) {\n\t\t\t/*@Caught\052/ @<%org.eclipse.jdt.annotation.NonNull%> <%java.lang.Object%> CAUGHT_propertyType;\n\t\t\ttry {\n\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.qvtcore.QVTcoreTables%>.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 getReferredTargetProperty = this.getReferredTargetProperty();\n\t\t\t\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.@<%org.eclipse.jdt.annotation.Nullable%> Type type = getReferredTargetProperty.getType();\n\t\t\t\tfinal /*@Thrown\052/ org.eclipse.ocl.pivot.@<%org.eclipse.jdt.annotation.NonNull%> CollectionType oclAsType = <%org.eclipse.ocl.pivot.utilities.ClassUtil%>.nonNullState((<%org.eclipse.ocl.pivot.CollectionType%>)<%org.eclipse.ocl.pivot.library.oclany.OclAnyOclAsTypeOperation%>.INSTANCE.evaluate(executor, type, TYP_CollectionType_0));\n\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\tfinal /*@Thrown\052/ org.eclipse.ocl.pivot.@<%org.eclipse.jdt.annotation.NonNull%> Type propertyType = oclAsType.getElementType();\n\t\t\t\tCAUGHT_propertyType = propertyType;\n\t\t\t}\n\t\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\t\tCAUGHT_propertyType = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t\t}\n\t\t\t@SuppressWarnings(\"null\")\n\t\t\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.@<%org.eclipse.jdt.annotation.NonNull%> OCLExpression value = this.getValue();\n\t\t\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.@<%org.eclipse.jdt.annotation.Nullable%> Type valueType = value.getType();\n\t\t\t/*@Caught\052/ @<%org.eclipse.jdt.annotation.NonNull%> <%java.lang.Object%> CAUGHT_conformsTo;\n\t\t\ttry {\n\t\t\t\tif (CAUGHT_propertyType instanceof <%org.eclipse.ocl.pivot.values.InvalidValueException%>) {\n\t\t\t\t\tthrow (<%org.eclipse.ocl.pivot.values.InvalidValueException%>)CAUGHT_propertyType;\n\t\t\t\t}\n\t\t\t\tfinal /*@Thrown\052/ boolean conformsTo = <%org.eclipse.ocl.pivot.library.classifier.OclTypeConformsToOperation%>.INSTANCE.evaluate(executor, valueType, CAUGHT_propertyType).booleanValue();\n\t\t\t\tCAUGHT_conformsTo = conformsTo;\n\t\t\t}\n\t\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\t\tCAUGHT_conformsTo = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t\t}\n\t\t\t/*@Caught\052/ @<%org.eclipse.jdt.annotation.NonNull%> <%java.lang.Object%> CAUGHT_conformsTo_0;\n\t\t\ttry {\n\t\t\t\tif (CAUGHT_propertyType instanceof <%org.eclipse.ocl.pivot.values.InvalidValueException%>) {\n\t\t\t\t\tthrow (<%org.eclipse.ocl.pivot.values.InvalidValueException%>)CAUGHT_propertyType;\n\t\t\t\t}\n\t\t\t\tfinal /*@Thrown\052/ boolean conformsTo_0 = <%org.eclipse.ocl.pivot.library.classifier.OclTypeConformsToOperation%>.INSTANCE.evaluate(executor, CAUGHT_propertyType, valueType).booleanValue();\n\t\t\t\tCAUGHT_conformsTo_0 = conformsTo_0;\n\t\t\t}\n\t\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\t\tCAUGHT_conformsTo_0 = <%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.BooleanOrOperation%>.INSTANCE.evaluate(CAUGHT_conformsTo, CAUGHT_conformsTo_0);\n\t\t\tfinal /*@Thrown\052/ boolean symbol_0 = status == Boolean.TRUE;\n\t\t\t/*@Thrown\052/ java.lang.@<%org.eclipse.jdt.annotation.NonNull%> Object symbol_3;\n\t\t\tif (symbol_0) {\n\t\t\t\tsymbol_3 = <%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.jdt.annotation.NonNull%> <%java.lang.Object%> symbol_1 = valueType == null;\n\t\t\t\t/*@Thrown\052/ java.lang.@<%org.eclipse.jdt.annotation.Nullable%> String safe_name_source;\n\t\t\t\tif (symbol_1 == 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 valueType != null;\n\t\t\t\t\tfinal /*@Thrown\052/ java.lang.@<%org.eclipse.jdt.annotation.Nullable%> String name = valueType.getName();\n\t\t\t\t\tsafe_name_source = name;\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(<%org.eclipse.qvtd.pivot.qvtcore.QVTcoreTables%>.STR_PropertyAssignment_c_c_CompatibleTypeForPartialValue_c_32, safe_name_source);\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, <%org.eclipse.qvtd.pivot.qvtcore.QVTcoreTables%>.STR__32_must_32_conform_32_to_32);\n\t\t\t\tif (CAUGHT_propertyType instanceof <%org.eclipse.ocl.pivot.values.InvalidValueException%>) {\n\t\t\t\t\tthrow (<%org.eclipse.ocl.pivot.values.InvalidValueException%>)CAUGHT_propertyType;\n\t\t\t\t}\n\t\t\t\tfinal /*@Thrown\052/ java.lang.@<%org.eclipse.jdt.annotation.Nullable%> String name_0 = ((<%org.eclipse.ocl.pivot.utilities.Nameable%>)CAUGHT_propertyType).getName();\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, name_0);\n\t\t\t\tfinal /*@Thrown\052/ java.lang.@<%org.eclipse.jdt.annotation.NonNull%> String sum_2 = <%org.eclipse.ocl.pivot.library.string.StringConcatOperation%>.INSTANCE.evaluate(sum_1, <%org.eclipse.qvtd.pivot.qvtcore.QVTcoreTables%>.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_2 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createTupleOfEach(<%org.eclipse.qvtd.pivot.qvtcore.QVTcoreTables%>.TUPLid_, sum_2, status);\n\t\t\t\tsymbol_3 = symbol_2;\n\t\t\t}\n\t\t\tresult = symbol_3;\n\t\t}\n\t\telse {\n\t\t\tresult = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t\t}\n\t\tCAUGHT_result = result;\n\t}\n\tcatch (<%java.lang.Exception%> e) {\n\t\tCAUGHT_result = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t}\n\tfinal /*@NonInvalid\052/ boolean logDiagnostic = <%org.eclipse.ocl.pivot.library.string.CGStringLogDiagnosticOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.ocl.pivot.ids.TypeId%>.BOOLEAN, <%org.eclipse.qvtd.pivot.qvtcore.QVTcoreTables%>.STR_PropertyAssignment_c_c_CompatibleTypeForPartialValue, this, (Object)null, diagnostics, context, (Object)null, severity_0, CAUGHT_result, <%org.eclipse.qvtd.pivot.qvtcore.QVTcoreTables%>.INT_0).booleanValue();\n\tsymbol_4 = logDiagnostic;\n}\nreturn Boolean.TRUE == symbol_4;'" |
| * @generated |
| */ |
| boolean validateCompatibleTypeForPartialValue(DiagnosticChain diagnostics, Map<Object, Object> context); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @model annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='CompatibleTypeForTotalValue'" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel body='/**\n *\n * inv CompatibleTypeForTotalValue:\n * let\n * severity : Integer[1] = \'PropertyAssignment::CompatibleTypeForTotalValue\'.getSeverity()\n * in\n * if severity <= 0\n * then true\n * else\n * let\n * result : OclAny[1] = if not isPartial\n * then\n * let propertyType : Type[?] = getReferredTargetProperty().type\n * in\n * let valueType : Type[?] = value.type\n * in\n * let\n * status : Boolean[?] = valueType.conformsTo(propertyType) or\n * propertyType.conformsTo(valueType)\n * in\n * if status = true\n * then true\n * else\n * Tuple{status = status, message = \'PropertyAssignment::CompatibleTypeForTotalValue: \' + valueType?.name + \' must conform to \' + propertyType?.name + \' or vice-versa\'\n * }\n * endif\n * else true\n * endif\n * in\n * \'PropertyAssignment::CompatibleTypeForTotalValue\'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)\n * endif\n \052/\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.evaluation.@<%org.eclipse.jdt.annotation.NonNull%> Executor executor = <%org.eclipse.ocl.pivot.internal.utilities.PivotUtilInternal%>.getExecutor(this);\nfinal /*@NonInvalid\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.qvtcore.QVTcoreTables%>.STR_PropertyAssignment_c_c_CompatibleTypeForTotalValue);\nfinal /*@NonInvalid\052/ boolean le = <%org.eclipse.ocl.pivot.library.oclany.OclComparableLessThanEqualOperation%>.INSTANCE.evaluate(executor, severity_0, <%org.eclipse.qvtd.pivot.qvtcore.QVTcoreTables%>.INT_0).booleanValue();\n/*@NonInvalid\052/ java.lang.@<%org.eclipse.jdt.annotation.NonNull%> Object symbol_5;\nif (le) {\n\tsymbol_5 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n}\nelse {\n\t/*@Caught\052/ @<%org.eclipse.jdt.annotation.NonNull%> <%java.lang.Object%> CAUGHT_result;\n\ttry {\n\t\tfinal /*@NonInvalid\052/ boolean isPartial = this.isIsPartial();\n\t\tfinal /*@NonInvalid\052/ java.lang.@<%org.eclipse.jdt.annotation.Nullable%> Boolean not = <%org.eclipse.ocl.pivot.library.logical.BooleanNotOperation%>.INSTANCE.evaluate(isPartial);\n\t\tif (not == null) {\n\t\t\tthrow new <%org.eclipse.ocl.pivot.values.InvalidValueException%>(\"Null if condition\");\n\t\t}\n\t\t/*@Thrown\052/ java.lang.@<%org.eclipse.jdt.annotation.NonNull%> Object result;\n\t\tif (not) {\n\t\t\t@SuppressWarnings(\"null\")\n\t\t\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.@<%org.eclipse.jdt.annotation.NonNull%> Property getReferredTargetProperty = this.getReferredTargetProperty();\n\t\t\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.@<%org.eclipse.jdt.annotation.Nullable%> Type propertyType = getReferredTargetProperty.getType();\n\t\t\t@SuppressWarnings(\"null\")\n\t\t\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.@<%org.eclipse.jdt.annotation.NonNull%> OCLExpression value = this.getValue();\n\t\t\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.@<%org.eclipse.jdt.annotation.Nullable%> Type valueType = value.getType();\n\t\t\t/*@Caught\052/ @<%org.eclipse.jdt.annotation.NonNull%> <%java.lang.Object%> CAUGHT_conformsTo;\n\t\t\ttry {\n\t\t\t\tfinal /*@Thrown\052/ boolean conformsTo = <%org.eclipse.ocl.pivot.library.classifier.OclTypeConformsToOperation%>.INSTANCE.evaluate(executor, valueType, propertyType).booleanValue();\n\t\t\t\tCAUGHT_conformsTo = conformsTo;\n\t\t\t}\n\t\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\t\tCAUGHT_conformsTo = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t\t}\n\t\t\t/*@Caught\052/ @<%org.eclipse.jdt.annotation.NonNull%> <%java.lang.Object%> CAUGHT_conformsTo_0;\n\t\t\ttry {\n\t\t\t\tfinal /*@Thrown\052/ boolean conformsTo_0 = <%org.eclipse.ocl.pivot.library.classifier.OclTypeConformsToOperation%>.INSTANCE.evaluate(executor, propertyType, valueType).booleanValue();\n\t\t\t\tCAUGHT_conformsTo_0 = conformsTo_0;\n\t\t\t}\n\t\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\t\tCAUGHT_conformsTo_0 = <%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.BooleanOrOperation%>.INSTANCE.evaluate(CAUGHT_conformsTo, CAUGHT_conformsTo_0);\n\t\t\tfinal /*@Thrown\052/ boolean symbol_0 = status == Boolean.TRUE;\n\t\t\t/*@Thrown\052/ java.lang.@<%org.eclipse.jdt.annotation.NonNull%> Object symbol_4;\n\t\t\tif (symbol_0) {\n\t\t\t\tsymbol_4 = <%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.jdt.annotation.NonNull%> <%java.lang.Object%> symbol_1 = valueType == null;\n\t\t\t\t/*@Thrown\052/ java.lang.@<%org.eclipse.jdt.annotation.Nullable%> String safe_name_source;\n\t\t\t\tif (symbol_1 == 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 valueType != null;\n\t\t\t\t\tfinal /*@Thrown\052/ java.lang.@<%org.eclipse.jdt.annotation.Nullable%> String name = valueType.getName();\n\t\t\t\t\tsafe_name_source = name;\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(<%org.eclipse.qvtd.pivot.qvtcore.QVTcoreTables%>.STR_PropertyAssignment_c_c_CompatibleTypeForTotalValue_c_32, safe_name_source);\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, <%org.eclipse.qvtd.pivot.qvtcore.QVTcoreTables%>.STR__32_must_32_conform_32_to_32);\n\t\t\t\tfinal /*@NonInvalid\052/ @<%org.eclipse.jdt.annotation.NonNull%> <%java.lang.Object%> symbol_2 = propertyType == 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 (symbol_2 == 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 propertyType != null;\n\t\t\t\t\tfinal /*@Thrown\052/ java.lang.@<%org.eclipse.jdt.annotation.Nullable%> String name_0 = propertyType.getName();\n\t\t\t\t\tsafe_name_source_0 = name_0;\n\t\t\t\t}\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, safe_name_source_0);\n\t\t\t\tfinal /*@Thrown\052/ java.lang.@<%org.eclipse.jdt.annotation.NonNull%> String sum_2 = <%org.eclipse.ocl.pivot.library.string.StringConcatOperation%>.INSTANCE.evaluate(sum_1, <%org.eclipse.qvtd.pivot.qvtcore.QVTcoreTables%>.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_3 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createTupleOfEach(<%org.eclipse.qvtd.pivot.qvtcore.QVTcoreTables%>.TUPLid_, sum_2, status);\n\t\t\t\tsymbol_4 = symbol_3;\n\t\t\t}\n\t\t\tresult = symbol_4;\n\t\t}\n\t\telse {\n\t\t\tresult = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t\t}\n\t\tCAUGHT_result = result;\n\t}\n\tcatch (<%java.lang.Exception%> e) {\n\t\tCAUGHT_result = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t}\n\tfinal /*@NonInvalid\052/ boolean logDiagnostic = <%org.eclipse.ocl.pivot.library.string.CGStringLogDiagnosticOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.ocl.pivot.ids.TypeId%>.BOOLEAN, <%org.eclipse.qvtd.pivot.qvtcore.QVTcoreTables%>.STR_PropertyAssignment_c_c_CompatibleTypeForTotalValue, this, (Object)null, diagnostics, context, (Object)null, severity_0, CAUGHT_result, <%org.eclipse.qvtd.pivot.qvtcore.QVTcoreTables%>.INT_0).booleanValue();\n\tsymbol_5 = logDiagnostic;\n}\nreturn Boolean.TRUE == symbol_5;'" |
| * @generated |
| */ |
| boolean validateCompatibleTypeForTotalValue(DiagnosticChain diagnostics, Map<Object, Object> context); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @model annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='PropertyIsNotImplicit'" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel body='/**\n *\n * inv PropertyIsNotImplicit:\n * let\n * severity : Integer[1] = \'PropertyAssignment::PropertyIsNotImplicit\'.getSeverity()\n * in\n * if severity <= 0\n * then true\n * else\n * let result : Boolean[?] = not targetProperty.isImplicit\n * in\n * \'PropertyAssignment::PropertyIsNotImplicit\'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)\n * endif\n \052/\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.evaluation.@<%org.eclipse.jdt.annotation.NonNull%> Executor executor = <%org.eclipse.ocl.pivot.internal.utilities.PivotUtilInternal%>.getExecutor(this);\nfinal /*@NonInvalid\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.qvtcore.QVTcoreTables%>.STR_PropertyAssignment_c_c_PropertyIsNotImplicit);\nfinal /*@NonInvalid\052/ boolean le = <%org.eclipse.ocl.pivot.library.oclany.OclComparableLessThanEqualOperation%>.INSTANCE.evaluate(executor, severity_0, <%org.eclipse.qvtd.pivot.qvtcore.QVTcoreTables%>.INT_0).booleanValue();\n/*@NonInvalid\052/ boolean symbol_0;\nif (le) {\n\tsymbol_0 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n}\nelse {\n\t@SuppressWarnings(\"null\")\n\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.@<%org.eclipse.jdt.annotation.NonNull%> Property targetProperty = this.getTargetProperty();\n\tfinal /*@NonInvalid\052/ boolean isImplicit = targetProperty.isIsImplicit();\n\tfinal /*@NonInvalid\052/ java.lang.@<%org.eclipse.jdt.annotation.Nullable%> Boolean result = <%org.eclipse.ocl.pivot.library.logical.BooleanNotOperation%>.INSTANCE.evaluate(isImplicit);\n\tfinal /*@NonInvalid\052/ boolean logDiagnostic = <%org.eclipse.ocl.pivot.library.string.CGStringLogDiagnosticOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.ocl.pivot.ids.TypeId%>.BOOLEAN, <%org.eclipse.qvtd.pivot.qvtcore.QVTcoreTables%>.STR_PropertyAssignment_c_c_PropertyIsNotImplicit, this, (Object)null, diagnostics, context, (Object)null, severity_0, result, <%org.eclipse.qvtd.pivot.qvtcore.QVTcoreTables%>.INT_0).booleanValue();\n\tsymbol_0 = logDiagnostic;\n}\nreturn Boolean.TRUE == symbol_0;'" |
| * @generated |
| */ |
| boolean validatePropertyIsNotImplicit(DiagnosticChain diagnostics, Map<Object, Object> context); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @model annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='TargetPropetyIsSlotProperty'" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel body='/**\n *\n * inv TargetPropetyIsSlotProperty:\n * let\n * severity : Integer[1] = \'PropertyAssignment::TargetPropetyIsSlotProperty\'.getSeverity()\n * in\n * if severity <= 0\n * then true\n * else\n * let\n * result : Boolean[1] = slotExpression.type.conformsTo(\n * getReferredTargetProperty().owningClass)\n * in\n * \'PropertyAssignment::TargetPropetyIsSlotProperty\'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)\n * endif\n \052/\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.evaluation.@<%org.eclipse.jdt.annotation.NonNull%> Executor executor = <%org.eclipse.ocl.pivot.internal.utilities.PivotUtilInternal%>.getExecutor(this);\nfinal /*@NonInvalid\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.qvtcore.QVTcoreTables%>.STR_PropertyAssignment_c_c_TargetPropetyIsSlotProperty);\nfinal /*@NonInvalid\052/ boolean le = <%org.eclipse.ocl.pivot.library.oclany.OclComparableLessThanEqualOperation%>.INSTANCE.evaluate(executor, severity_0, <%org.eclipse.qvtd.pivot.qvtcore.QVTcoreTables%>.INT_0).booleanValue();\n/*@NonInvalid\052/ boolean symbol_0;\nif (le) {\n\tsymbol_0 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n}\nelse {\n\t/*@Caught\052/ @<%org.eclipse.jdt.annotation.NonNull%> <%java.lang.Object%> CAUGHT_result;\n\ttry {\n\t\t@SuppressWarnings(\"null\")\n\t\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.@<%org.eclipse.jdt.annotation.NonNull%> OCLExpression slotExpression = this.getSlotExpression();\n\t\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.@<%org.eclipse.jdt.annotation.Nullable%> Type type = slotExpression.getType();\n\t\t@SuppressWarnings(\"null\")\n\t\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.@<%org.eclipse.jdt.annotation.NonNull%> Property getReferredTargetProperty = this.getReferredTargetProperty();\n\t\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.@<%org.eclipse.jdt.annotation.Nullable%> Class owningClass = getReferredTargetProperty.getOwningClass();\n\t\tfinal /*@Thrown\052/ boolean result = <%org.eclipse.ocl.pivot.library.classifier.OclTypeConformsToOperation%>.INSTANCE.evaluate(executor, type, owningClass).booleanValue();\n\t\tCAUGHT_result = result;\n\t}\n\tcatch (<%java.lang.Exception%> e) {\n\t\tCAUGHT_result = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t}\n\tfinal /*@NonInvalid\052/ boolean logDiagnostic = <%org.eclipse.ocl.pivot.library.string.CGStringLogDiagnosticOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.ocl.pivot.ids.TypeId%>.BOOLEAN, <%org.eclipse.qvtd.pivot.qvtcore.QVTcoreTables%>.STR_PropertyAssignment_c_c_TargetPropetyIsSlotProperty, this, (Object)null, diagnostics, context, (Object)null, severity_0, CAUGHT_result, <%org.eclipse.qvtd.pivot.qvtcore.QVTcoreTables%>.INT_0).booleanValue();\n\tsymbol_0 = logDiagnostic;\n}\nreturn Boolean.TRUE == symbol_0;'" |
| * @generated |
| */ |
| boolean validateTargetPropetyIsSlotProperty(DiagnosticChain diagnostics, Map<Object, Object> context); |
| |
| } // PropertyAssignment |