Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example1/Source2Target.qvtias33
-rw-r--r--tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example1/Source2Target.qvtp.qvtias33
-rw-r--r--tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example4/SimplerKiama.qvtias6
-rw-r--r--tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example4/SimplerKiama.qvtp.qvtias6
-rw-r--r--tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/cg/Source2Target_qvtp_qvtias.java219
-rw-r--r--tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/cg/classescs2as_qvtp_qvtias.java60
-rw-r--r--tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src-gen/cg/ManualUML2RDBMS.java204
-rw-r--r--tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src-gen/cg/classescs2as.java74
-rw-r--r--tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src-gen/cg/classescs2as_Bug459225.java40
-rw-r--r--tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src-gen/cg/hsv2hls.java23
10 files changed, 337 insertions, 361 deletions
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example1/Source2Target.qvtias b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example1/Source2Target.qvtias
index 2035b64fe..6bd55779b 100644
--- a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example1/Source2Target.qvtias
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example1/Source2Target.qvtias
@@ -373,7 +373,7 @@
<ownedSource xsi:type="pivot:PropertyCallExp" type="#//@ownedPackages.1/@ownedClasses.4" referredProperty="SourceMM1.ecore.oclas#p.source.X.ownsY">
<ownedSource xsi:type="pivot:VariableExp" type="pivot:Class SourceMM1.ecore.oclas#T.source.X" isImplicit="true" referredVariable="#qV..Source2Target_qvtp_qvtias.uA3_ownsC.leftCS.guard.x"/>
</ownedSource>
- <ownedBody xsi:type="pivot:OperationCallExp" isRequired="false" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y2" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
+ <ownedBody xsi:type="pivot:OperationCallExp" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y2" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
<ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y" isImplicit="true"
referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.10/@bottomPattern/@assignment.0/@value/@ownedSource/@ownedIterators.0"/>
<ownedArguments xsi:type="pivot:TypeExp" type="pivot:Class http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.Class"
@@ -384,13 +384,12 @@
<ownedBody xsi:type="pivot:OperationCallExp" type="pivot:Class TargetMM1.ecore.oclas#T.target.C" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
<ownedSource xsi:type="pivot:PropertyCallExp" type="pivot:Class http://www.eclipse.org/emf/2002/Ecore.oclas#T.ecore.EObject"
referredProperty="SourceMM1.ecore.oclas#p.source.SElement.ast">
- <ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y2" isImplicit="true"
- referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.10/@bottomPattern/@assignment.0/@value/@ownedIterators.0"/>
+ <ownedSource xsi:type="pivot:VariableExp" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y2" isImplicit="true" referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.10/@bottomPattern/@assignment.0/@value/@ownedIterators.0"/>
</ownedSource>
<ownedArguments xsi:type="pivot:TypeExp" type="pivot:Class http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.Class"
referredType="pivot:Class TargetMM1.ecore.oclas#T.target.C"/>
</ownedBody>
- <ownedIterators name="1_" isRequired="false" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y2" isImplicit="true" representedParameter="http://www.eclipse.org/ocl/2015/Library.oclas#i0i.ocl.Sequence.collect..T"/>
+ <ownedIterators name="1_" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y2" isImplicit="true" representedParameter="http://www.eclipse.org/ocl/2015/Library.oclas#i0i.ocl.Sequence.collect..T"/>
</value>
<slotExpression xsi:type="pivot:OperationCallExp" type="pivot:Class TargetMM1.ecore.oclas#T.target.A3" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
<ownedSource xsi:type="pivot:PropertyCallExp" type="pivot:Class http://www.eclipse.org/emf/2002/Ecore.oclas#T.ecore.EObject"
@@ -481,7 +480,7 @@
<ownedSource xsi:type="pivot:PropertyCallExp" type="#//@ownedPackages.1/@ownedClasses.4" referredProperty="SourceMM1.ecore.oclas#p.source.X.ownsY">
<ownedSource xsi:type="pivot:VariableExp" type="pivot:Class SourceMM1.ecore.oclas#T.source.X" isImplicit="true" referredVariable="#qV..Source2Target_qvtp_qvtias.uA2_ownsC.leftCS.guard.x"/>
</ownedSource>
- <ownedBody xsi:type="pivot:OperationCallExp" isRequired="false" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y2" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
+ <ownedBody xsi:type="pivot:OperationCallExp" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y2" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
<ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y" isImplicit="true"
referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.12/@bottomPattern/@assignment.0/@value/@ownedSource/@ownedIterators.0"/>
<ownedArguments xsi:type="pivot:TypeExp" type="pivot:Class http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.Class"
@@ -492,13 +491,12 @@
<ownedBody xsi:type="pivot:OperationCallExp" type="pivot:Class TargetMM1.ecore.oclas#T.target.C" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
<ownedSource xsi:type="pivot:PropertyCallExp" type="pivot:Class http://www.eclipse.org/emf/2002/Ecore.oclas#T.ecore.EObject"
referredProperty="SourceMM1.ecore.oclas#p.source.SElement.ast">
- <ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y2" isImplicit="true"
- referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.12/@bottomPattern/@assignment.0/@value/@ownedIterators.0"/>
+ <ownedSource xsi:type="pivot:VariableExp" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y2" isImplicit="true" referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.12/@bottomPattern/@assignment.0/@value/@ownedIterators.0"/>
</ownedSource>
<ownedArguments xsi:type="pivot:TypeExp" type="pivot:Class http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.Class"
referredType="pivot:Class TargetMM1.ecore.oclas#T.target.C"/>
</ownedBody>
- <ownedIterators name="1_" isRequired="false" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y2" isImplicit="true" representedParameter="http://www.eclipse.org/ocl/2015/Library.oclas#i0i.ocl.Sequence.collect..T"/>
+ <ownedIterators name="1_" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y2" isImplicit="true" representedParameter="http://www.eclipse.org/ocl/2015/Library.oclas#i0i.ocl.Sequence.collect..T"/>
</value>
<slotExpression xsi:type="pivot:OperationCallExp" type="pivot:Class TargetMM1.ecore.oclas#T.target.A2" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
<ownedSource xsi:type="pivot:PropertyCallExp" type="pivot:Class http://www.eclipse.org/emf/2002/Ecore.oclas#T.ecore.EObject"
@@ -571,7 +569,7 @@
<ownedSource xsi:type="pivot:PropertyCallExp" type="#//@ownedPackages.1/@ownedClasses.4" referredProperty="SourceMM1.ecore.oclas#p.source.X.ownsY">
<ownedSource xsi:type="pivot:VariableExp" type="pivot:Class SourceMM1.ecore.oclas#T.source.X" isImplicit="true" referredVariable="#qV..Source2Target_qvtp_qvtias.uA1_ownsB.leftCS.guard.x"/>
</ownedSource>
- <ownedBody xsi:type="pivot:OperationCallExp" isRequired="false" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y1" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
+ <ownedBody xsi:type="pivot:OperationCallExp" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y1" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
<ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y" isImplicit="true"
referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.14/@bottomPattern/@assignment.0/@value/@ownedSource/@ownedIterators.0"/>
<ownedArguments xsi:type="pivot:TypeExp" type="pivot:Class http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.Class"
@@ -582,13 +580,12 @@
<ownedBody xsi:type="pivot:OperationCallExp" type="pivot:Class TargetMM1.ecore.oclas#T.target.B" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
<ownedSource xsi:type="pivot:PropertyCallExp" type="pivot:Class http://www.eclipse.org/emf/2002/Ecore.oclas#T.ecore.EObject"
referredProperty="SourceMM1.ecore.oclas#p.source.SElement.ast">
- <ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y1" isImplicit="true"
- referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.14/@bottomPattern/@assignment.0/@value/@ownedIterators.0"/>
+ <ownedSource xsi:type="pivot:VariableExp" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y1" isImplicit="true" referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.14/@bottomPattern/@assignment.0/@value/@ownedIterators.0"/>
</ownedSource>
<ownedArguments xsi:type="pivot:TypeExp" type="pivot:Class http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.Class"
referredType="pivot:Class TargetMM1.ecore.oclas#T.target.B"/>
</ownedBody>
- <ownedIterators name="1_" isRequired="false" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y1" isImplicit="true" representedParameter="http://www.eclipse.org/ocl/2015/Library.oclas#i0i.ocl.Sequence.collect..T"/>
+ <ownedIterators name="1_" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y1" isImplicit="true" representedParameter="http://www.eclipse.org/ocl/2015/Library.oclas#i0i.ocl.Sequence.collect..T"/>
</value>
<slotExpression xsi:type="pivot:OperationCallExp" type="pivot:Class TargetMM1.ecore.oclas#T.target.A1" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
<ownedSource xsi:type="pivot:PropertyCallExp" type="pivot:Class http://www.eclipse.org/emf/2002/Ecore.oclas#T.ecore.EObject"
@@ -754,8 +751,7 @@
<ownedSource xsi:type="pivot:OperationCallExp" type="pivot:Class TargetMM1.ecore.oclas#T.target.C" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
<ownedSource xsi:type="pivot:PropertyCallExp" type="pivot:Class http://www.eclipse.org/emf/2002/Ecore.oclas#T.ecore.EObject"
referredProperty="SourceMM1.ecore.oclas#p.source.SElement.ast">
- <ownedSource xsi:type="pivot:OperationCallExp" isRequired="false" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y2"
- referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
+ <ownedSource xsi:type="pivot:OperationCallExp" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y2" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
<ownedSource xsi:type="pivot:PropertyCallExp" isRequired="false" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y"
referredProperty="SourceMM1.ecore.oclas#p.source.Z.toY">
<ownedSource xsi:type="pivot:VariableExp" type="pivot:Class SourceMM1.ecore.oclas#T.source.Z" isImplicit="true"
@@ -856,8 +852,7 @@
<ownedSource xsi:type="pivot:OperationCallExp" type="pivot:Class TargetMM1.ecore.oclas#T.target.B" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
<ownedSource xsi:type="pivot:PropertyCallExp" type="pivot:Class http://www.eclipse.org/emf/2002/Ecore.oclas#T.ecore.EObject"
referredProperty="SourceMM1.ecore.oclas#p.source.SElement.ast">
- <ownedSource xsi:type="pivot:OperationCallExp" isRequired="false" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y1"
- referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
+ <ownedSource xsi:type="pivot:OperationCallExp" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y1" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
<ownedSource xsi:type="pivot:PropertyCallExp" isRequired="false" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y"
referredProperty="SourceMM1.ecore.oclas#p.source.Z.toY">
<ownedSource xsi:type="pivot:VariableExp" type="pivot:Class SourceMM1.ecore.oclas#T.source.Z" isImplicit="true"
@@ -1251,7 +1246,8 @@
<ownedSubstitutions actual="pivot:Class TargetMM1.ecore.oclas#T.target.C" formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..SequenceT"/>
</ownedBindings>
</ownedClasses>
- <ownedClasses xsi:type="pivot:SequenceType" name="Sequence" superClasses="#//@ownedPackages.1/@ownedClasses.16" elementType="pivot:Class SourceMM1.ecore.oclas#T.source.Y2">
+ <ownedClasses xsi:type="pivot:SequenceType" name="Sequence" superClasses="#//@ownedPackages.1/@ownedClasses.16" elementType="pivot:Class SourceMM1.ecore.oclas#T.source.Y2"
+ isNullFree="true">
<ownedBindings>
<ownedSubstitutions actual="pivot:Class SourceMM1.ecore.oclas#T.source.Y2" formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..SequenceT"/>
</ownedBindings>
@@ -1267,7 +1263,8 @@
<ownedSubstitutions actual="pivot:Class TargetMM1.ecore.oclas#T.target.B" formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..SequenceT"/>
</ownedBindings>
</ownedClasses>
- <ownedClasses xsi:type="pivot:SequenceType" name="Sequence" superClasses="#//@ownedPackages.1/@ownedClasses.20" elementType="pivot:Class SourceMM1.ecore.oclas#T.source.Y1">
+ <ownedClasses xsi:type="pivot:SequenceType" name="Sequence" superClasses="#//@ownedPackages.1/@ownedClasses.20" elementType="pivot:Class SourceMM1.ecore.oclas#T.source.Y1"
+ isNullFree="true">
<ownedBindings>
<ownedSubstitutions actual="pivot:Class SourceMM1.ecore.oclas#T.source.Y1" formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..SequenceT"/>
</ownedBindings>
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example1/Source2Target.qvtp.qvtias b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example1/Source2Target.qvtp.qvtias
index d04914cf6..c24ce1ee3 100644
--- a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example1/Source2Target.qvtp.qvtias
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example1/Source2Target.qvtp.qvtias
@@ -369,7 +369,7 @@
<ownedSource xsi:type="pivot:PropertyCallExp" type="#//@ownedPackages.1/@ownedClasses.4" referredProperty="SourceMM1.ecore.oclas#p.source.X.ownsY">
<ownedSource xsi:type="pivot:VariableExp" type="pivot:Class SourceMM1.ecore.oclas#T.source.X" isImplicit="true" referredVariable="#qV..Source2Target_qvtp_qvtias.uA3_ownsC.leftCS.guard.x"/>
</ownedSource>
- <ownedBody xsi:type="pivot:OperationCallExp" isRequired="false" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y2" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
+ <ownedBody xsi:type="pivot:OperationCallExp" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y2" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
<ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y" isImplicit="true"
referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.10/@bottomPattern/@assignment.0/@value/@ownedSource/@ownedIterators.0"/>
<ownedArguments xsi:type="pivot:TypeExp" type="pivot:Class http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.Class"
@@ -380,13 +380,12 @@
<ownedBody xsi:type="pivot:OperationCallExp" type="pivot:Class TargetMM1.ecore.oclas#T.target.C" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
<ownedSource xsi:type="pivot:PropertyCallExp" type="pivot:Class http://www.eclipse.org/emf/2002/Ecore.oclas#T.ecore.EObject"
referredProperty="SourceMM1.ecore.oclas#p.source.SElement.ast">
- <ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y2" isImplicit="true"
- referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.10/@bottomPattern/@assignment.0/@value/@ownedIterators.0"/>
+ <ownedSource xsi:type="pivot:VariableExp" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y2" isImplicit="true" referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.10/@bottomPattern/@assignment.0/@value/@ownedIterators.0"/>
</ownedSource>
<ownedArguments xsi:type="pivot:TypeExp" type="pivot:Class http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.Class"
referredType="pivot:Class TargetMM1.ecore.oclas#T.target.C"/>
</ownedBody>
- <ownedIterators name="1_" isRequired="false" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y2" isImplicit="true" representedParameter="http://www.eclipse.org/ocl/2015/Library.oclas#i0i.ocl.Sequence.collect..T"/>
+ <ownedIterators name="1_" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y2" isImplicit="true" representedParameter="http://www.eclipse.org/ocl/2015/Library.oclas#i0i.ocl.Sequence.collect..T"/>
</value>
<slotExpression xsi:type="pivot:OperationCallExp" type="pivot:Class TargetMM1.ecore.oclas#T.target.A3" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
<ownedSource xsi:type="pivot:PropertyCallExp" type="pivot:Class http://www.eclipse.org/emf/2002/Ecore.oclas#T.ecore.EObject"
@@ -477,7 +476,7 @@
<ownedSource xsi:type="pivot:PropertyCallExp" type="#//@ownedPackages.1/@ownedClasses.4" referredProperty="SourceMM1.ecore.oclas#p.source.X.ownsY">
<ownedSource xsi:type="pivot:VariableExp" type="pivot:Class SourceMM1.ecore.oclas#T.source.X" isImplicit="true" referredVariable="#qV..Source2Target_qvtp_qvtias.uA2_ownsC.leftCS.guard.x"/>
</ownedSource>
- <ownedBody xsi:type="pivot:OperationCallExp" isRequired="false" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y2" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
+ <ownedBody xsi:type="pivot:OperationCallExp" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y2" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
<ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y" isImplicit="true"
referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.12/@bottomPattern/@assignment.0/@value/@ownedSource/@ownedIterators.0"/>
<ownedArguments xsi:type="pivot:TypeExp" type="pivot:Class http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.Class"
@@ -488,13 +487,12 @@
<ownedBody xsi:type="pivot:OperationCallExp" type="pivot:Class TargetMM1.ecore.oclas#T.target.C" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
<ownedSource xsi:type="pivot:PropertyCallExp" type="pivot:Class http://www.eclipse.org/emf/2002/Ecore.oclas#T.ecore.EObject"
referredProperty="SourceMM1.ecore.oclas#p.source.SElement.ast">
- <ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y2" isImplicit="true"
- referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.12/@bottomPattern/@assignment.0/@value/@ownedIterators.0"/>
+ <ownedSource xsi:type="pivot:VariableExp" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y2" isImplicit="true" referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.12/@bottomPattern/@assignment.0/@value/@ownedIterators.0"/>
</ownedSource>
<ownedArguments xsi:type="pivot:TypeExp" type="pivot:Class http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.Class"
referredType="pivot:Class TargetMM1.ecore.oclas#T.target.C"/>
</ownedBody>
- <ownedIterators name="1_" isRequired="false" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y2" isImplicit="true" representedParameter="http://www.eclipse.org/ocl/2015/Library.oclas#i0i.ocl.Sequence.collect..T"/>
+ <ownedIterators name="1_" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y2" isImplicit="true" representedParameter="http://www.eclipse.org/ocl/2015/Library.oclas#i0i.ocl.Sequence.collect..T"/>
</value>
<slotExpression xsi:type="pivot:OperationCallExp" type="pivot:Class TargetMM1.ecore.oclas#T.target.A2" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
<ownedSource xsi:type="pivot:PropertyCallExp" type="pivot:Class http://www.eclipse.org/emf/2002/Ecore.oclas#T.ecore.EObject"
@@ -567,7 +565,7 @@
<ownedSource xsi:type="pivot:PropertyCallExp" type="#//@ownedPackages.1/@ownedClasses.4" referredProperty="SourceMM1.ecore.oclas#p.source.X.ownsY">
<ownedSource xsi:type="pivot:VariableExp" type="pivot:Class SourceMM1.ecore.oclas#T.source.X" isImplicit="true" referredVariable="#qV..Source2Target_qvtp_qvtias.uA1_ownsB.leftCS.guard.x"/>
</ownedSource>
- <ownedBody xsi:type="pivot:OperationCallExp" isRequired="false" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y1" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
+ <ownedBody xsi:type="pivot:OperationCallExp" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y1" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
<ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y" isImplicit="true"
referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.14/@bottomPattern/@assignment.0/@value/@ownedSource/@ownedIterators.0"/>
<ownedArguments xsi:type="pivot:TypeExp" type="pivot:Class http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.Class"
@@ -578,13 +576,12 @@
<ownedBody xsi:type="pivot:OperationCallExp" type="pivot:Class TargetMM1.ecore.oclas#T.target.B" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
<ownedSource xsi:type="pivot:PropertyCallExp" type="pivot:Class http://www.eclipse.org/emf/2002/Ecore.oclas#T.ecore.EObject"
referredProperty="SourceMM1.ecore.oclas#p.source.SElement.ast">
- <ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y1" isImplicit="true"
- referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.14/@bottomPattern/@assignment.0/@value/@ownedIterators.0"/>
+ <ownedSource xsi:type="pivot:VariableExp" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y1" isImplicit="true" referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.14/@bottomPattern/@assignment.0/@value/@ownedIterators.0"/>
</ownedSource>
<ownedArguments xsi:type="pivot:TypeExp" type="pivot:Class http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.Class"
referredType="pivot:Class TargetMM1.ecore.oclas#T.target.B"/>
</ownedBody>
- <ownedIterators name="1_" isRequired="false" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y1" isImplicit="true" representedParameter="http://www.eclipse.org/ocl/2015/Library.oclas#i0i.ocl.Sequence.collect..T"/>
+ <ownedIterators name="1_" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y1" isImplicit="true" representedParameter="http://www.eclipse.org/ocl/2015/Library.oclas#i0i.ocl.Sequence.collect..T"/>
</value>
<slotExpression xsi:type="pivot:OperationCallExp" type="pivot:Class TargetMM1.ecore.oclas#T.target.A1" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
<ownedSource xsi:type="pivot:PropertyCallExp" type="pivot:Class http://www.eclipse.org/emf/2002/Ecore.oclas#T.ecore.EObject"
@@ -750,8 +747,7 @@
<ownedSource xsi:type="pivot:OperationCallExp" type="pivot:Class TargetMM1.ecore.oclas#T.target.C" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
<ownedSource xsi:type="pivot:PropertyCallExp" type="pivot:Class http://www.eclipse.org/emf/2002/Ecore.oclas#T.ecore.EObject"
referredProperty="SourceMM1.ecore.oclas#p.source.SElement.ast">
- <ownedSource xsi:type="pivot:OperationCallExp" isRequired="false" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y2"
- referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
+ <ownedSource xsi:type="pivot:OperationCallExp" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y2" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
<ownedSource xsi:type="pivot:PropertyCallExp" isRequired="false" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y"
referredProperty="SourceMM1.ecore.oclas#p.source.Z.toY">
<ownedSource xsi:type="pivot:VariableExp" type="pivot:Class SourceMM1.ecore.oclas#T.source.Z" isImplicit="true"
@@ -852,8 +848,7 @@
<ownedSource xsi:type="pivot:OperationCallExp" type="pivot:Class TargetMM1.ecore.oclas#T.target.B" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
<ownedSource xsi:type="pivot:PropertyCallExp" type="pivot:Class http://www.eclipse.org/emf/2002/Ecore.oclas#T.ecore.EObject"
referredProperty="SourceMM1.ecore.oclas#p.source.SElement.ast">
- <ownedSource xsi:type="pivot:OperationCallExp" isRequired="false" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y1"
- referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
+ <ownedSource xsi:type="pivot:OperationCallExp" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y1" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
<ownedSource xsi:type="pivot:PropertyCallExp" isRequired="false" type="pivot:Class SourceMM1.ecore.oclas#T.source.Y"
referredProperty="SourceMM1.ecore.oclas#p.source.Z.toY">
<ownedSource xsi:type="pivot:VariableExp" type="pivot:Class SourceMM1.ecore.oclas#T.source.Z" isImplicit="true"
@@ -941,7 +936,8 @@
<ownedSubstitutions actual="pivot:Class TargetMM1.ecore.oclas#T.target.C" formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..SequenceT"/>
</ownedBindings>
</ownedClasses>
- <ownedClasses xsi:type="pivot:SequenceType" name="Sequence" superClasses="#//@ownedPackages.1/@ownedClasses.11" elementType="pivot:Class SourceMM1.ecore.oclas#T.source.Y2">
+ <ownedClasses xsi:type="pivot:SequenceType" name="Sequence" superClasses="#//@ownedPackages.1/@ownedClasses.11" elementType="pivot:Class SourceMM1.ecore.oclas#T.source.Y2"
+ isNullFree="true">
<ownedBindings>
<ownedSubstitutions actual="pivot:Class SourceMM1.ecore.oclas#T.source.Y2" formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..SequenceT"/>
</ownedBindings>
@@ -957,7 +953,8 @@
<ownedSubstitutions actual="pivot:Class TargetMM1.ecore.oclas#T.target.B" formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..SequenceT"/>
</ownedBindings>
</ownedClasses>
- <ownedClasses xsi:type="pivot:SequenceType" name="Sequence" superClasses="#//@ownedPackages.1/@ownedClasses.15" elementType="pivot:Class SourceMM1.ecore.oclas#T.source.Y1">
+ <ownedClasses xsi:type="pivot:SequenceType" name="Sequence" superClasses="#//@ownedPackages.1/@ownedClasses.15" elementType="pivot:Class SourceMM1.ecore.oclas#T.source.Y1"
+ isNullFree="true">
<ownedBindings>
<ownedSubstitutions actual="pivot:Class SourceMM1.ecore.oclas#T.source.Y1" formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..SequenceT"/>
</ownedBindings>
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example4/SimplerKiama.qvtias b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example4/SimplerKiama.qvtias
index 26640e142..44a8b4c9b 100644
--- a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example4/SimplerKiama.qvtias
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example4/SimplerKiama.qvtias
@@ -137,8 +137,7 @@
referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.Integer.%43%..ocl.OclSelf">
<ownedSource xsi:type="pivot:PropertyCallExp" isRequired="false" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#Integer"
referredProperty="SimplerKiamaAS.ecore.oclas#p.kiamaas.Node.deep">
- <ownedSource xsi:type="pivot:OperationCallExp" isRequired="false" type="pivot:Class SimplerKiamaAS.ecore.oclas#T.kiamaas.Node"
- referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
+ <ownedSource xsi:type="pivot:OperationCallExp" type="pivot:Class SimplerKiamaAS.ecore.oclas#T.kiamaas.Node" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
<ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.OclElement"
referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.4/@bottomPattern/@assignment.0/@value/@ownedVariable"/>
<ownedArguments xsi:type="pivot:TypeExp" type="pivot:Class http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.Class"
@@ -247,8 +246,7 @@
referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.Integer.%43%..ocl.OclSelf">
<ownedSource xsi:type="pivot:PropertyCallExp" isRequired="false" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#Integer"
referredProperty="SimplerKiamaAS.ecore.oclas#p.kiamaas.Node.deep">
- <ownedSource xsi:type="pivot:OperationCallExp" isRequired="false" type="pivot:Class SimplerKiamaAS.ecore.oclas#T.kiamaas.Node"
- referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
+ <ownedSource xsi:type="pivot:OperationCallExp" type="pivot:Class SimplerKiamaAS.ecore.oclas#T.kiamaas.Node" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
<ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.OclElement"
referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.6/@bottomPattern/@assignment.0/@value/@ownedVariable"/>
<ownedArguments xsi:type="pivot:TypeExp" type="pivot:Class http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.Class"
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example4/SimplerKiama.qvtp.qvtias b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example4/SimplerKiama.qvtp.qvtias
index 05df87549..5f4194d61 100644
--- a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example4/SimplerKiama.qvtp.qvtias
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/example4/SimplerKiama.qvtp.qvtias
@@ -137,8 +137,7 @@
referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.Integer.%43%..ocl.OclSelf">
<ownedSource xsi:type="pivot:PropertyCallExp" isRequired="false" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#Integer"
referredProperty="SimplerKiamaAS.ecore.oclas#p.kiamaas.Node.deep">
- <ownedSource xsi:type="pivot:OperationCallExp" isRequired="false" type="pivot:Class SimplerKiamaAS.ecore.oclas#T.kiamaas.Node"
- referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
+ <ownedSource xsi:type="pivot:OperationCallExp" type="pivot:Class SimplerKiamaAS.ecore.oclas#T.kiamaas.Node" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
<ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.OclElement"
referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.4/@bottomPattern/@assignment.0/@value/@ownedVariable"/>
<ownedArguments xsi:type="pivot:TypeExp" type="pivot:Class http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.Class"
@@ -247,8 +246,7 @@
referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.Integer.%43%..ocl.OclSelf">
<ownedSource xsi:type="pivot:PropertyCallExp" isRequired="false" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#Integer"
referredProperty="SimplerKiamaAS.ecore.oclas#p.kiamaas.Node.deep">
- <ownedSource xsi:type="pivot:OperationCallExp" isRequired="false" type="pivot:Class SimplerKiamaAS.ecore.oclas#T.kiamaas.Node"
- referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
+ <ownedSource xsi:type="pivot:OperationCallExp" type="pivot:Class SimplerKiamaAS.ecore.oclas#T.kiamaas.Node" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclAsType..TT">
<ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.OclElement"
referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.6/@bottomPattern/@assignment.0/@value/@ownedVariable"/>
<ownedArguments xsi:type="pivot:TypeExp" type="pivot:Class http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.Class"
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/cg/Source2Target_qvtp_qvtias.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/cg/Source2Target_qvtp_qvtias.java
index 7c9026082..f8945c71d 100644
--- a/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/cg/Source2Target_qvtp_qvtias.java
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/cg/Source2Target_qvtp_qvtias.java
@@ -54,6 +54,7 @@ import org.eclipse.ocl.pivot.library.logical.BooleanNotOperation;
import org.eclipse.ocl.pivot.library.numeric.NumericMinusOperation;
import org.eclipse.ocl.pivot.library.oclany.OclAnyOclAsTypeOperation;
import org.eclipse.ocl.pivot.library.oclany.OclAnyOclIsKindOfOperation;
+import org.eclipse.ocl.pivot.utilities.ClassUtil;
import org.eclipse.ocl.pivot.utilities.ValueUtil;
import org.eclipse.ocl.pivot.values.IntegerValue;
import org.eclipse.ocl.pivot.values.OrderedSetValue;
@@ -165,8 +166,8 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
public /*@Nullable*/ /*@NonInvalid*/ Namespace lookupNamespace(final /*@NonNull*/ /*@NonInvalid*/ Visitable self_0, final /*@NonNull*/ /*@NonInvalid*/ List<PathElementCS> pathSeq) {
final /*@NonNull*/ /*@NonInvalid*/ IdResolver idResolver = evaluator.getIdResolver();
final /*@NonNull*/ /*@NonInvalid*/ OrderedSetValue BOXED_pathSeq_0 = idResolver.createOrderedSetOfAll(ORD_CLSSid_PathElementCS, pathSeq);
- final /*@NonNull*/ /*@Thrown*/ IntegerValue size = CollectionSizeOperation.INSTANCE.evaluate(BOXED_pathSeq_0);
- final /*@Thrown*/ boolean eq = size.equals(INT_1);
+ final /*@NonNull*/ /*@NonInvalid*/ IntegerValue size = CollectionSizeOperation.INSTANCE.evaluate(BOXED_pathSeq_0);
+ final /*@NonInvalid*/ boolean eq = size.equals(INT_1);
/*@Nullable*/ /*@Thrown*/ Namespace symbol_1;
if (eq) {
final /*@Nullable*/ /*@Thrown*/ PathElementCS first = (PathElementCS)OrderedCollectionFirstOperation.INSTANCE.evaluate(BOXED_pathSeq_0);
@@ -182,15 +183,22 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
symbol_1 = _lookupNamespace;
}
else {
- final /*@NonNull*/ /*@Thrown*/ IntegerValue diff = (IntegerValue)NumericMinusOperation.INSTANCE.evaluate(size, INT_1);
+ final /*@NonNull*/ /*@NonInvalid*/ IntegerValue diff = (IntegerValue)NumericMinusOperation.INSTANCE.evaluate(size, INT_1);
final /*@NonNull*/ /*@Thrown*/ OrderedSetValue subOrderedSet = OrderedSetSubOrderedSetOperation.INSTANCE.evaluate(BOXED_pathSeq_0, INT_1, diff);
final List<PathElementCS> UNBOXED_subOrderedSet = subOrderedSet.asEcoreObjects(idResolver, PathElementCS.class);
assert UNBOXED_subOrderedSet != null;
final /*@Nullable*/ /*@Thrown*/ Namespace lookupNamespace = this.lookupNamespace(self_0, UNBOXED_subOrderedSet);
- final /*@Thrown*/ boolean symbol_0 = lookupNamespace == null;
- /*@Nullable*/ /*@Thrown*/ Namespace safe__lookupNamespace;
- if (symbol_0) {
- safe__lookupNamespace = null;
+ /*@Nullable*/ /*@Caught*/ Object CAUGHT_lookupNamespace;
+ try {
+ CAUGHT_lookupNamespace = lookupNamespace;
+ }
+ catch (Exception e) {
+ CAUGHT_lookupNamespace = ValueUtil.createInvalidValue(e);
+ }
+ final /*@NonNull*/ /*@NonInvalid*/ Object symbol_0 = CAUGHT_lookupNamespace == null;
+ /*@Nullable*/ /*@Thrown*/ Namespace safe__lookupNamespace_source;
+ if (symbol_0 == Boolean.TRUE) {
+ safe__lookupNamespace_source = null;
}
else {
final /*@Nullable*/ /*@Thrown*/ PathElementCS last = (PathElementCS)OrderedCollectionLastOperation.INSTANCE.evaluate(BOXED_pathSeq_0);
@@ -203,9 +211,9 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
} else {
handleLookupError(pathSeq,last);
};
- safe__lookupNamespace = _lookupNamespace_0;
+ safe__lookupNamespace_source = _lookupNamespace_0;
}
- symbol_1 = safe__lookupNamespace;
+ symbol_1 = safe__lookupNamespace_source;
}
return symbol_1;
}
@@ -499,9 +507,9 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
// creations
// assignments
final /*@Nullable*/ /*@Thrown*/ EObject ast = sRoot_0.getAst();
- final /*@Nullable*/ /*@Thrown*/ TRoot oclAsType = (TRoot)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_TRoot_0);
- final /*@Nullable*/ /*@Thrown*/ List<X> ownedX = sRoot_0.getOwnedX();
- assert ownedX != null;
+ final /*@NonNull*/ /*@Thrown*/ TRoot oclAsType = ClassUtil.nonNullState((TRoot)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_TRoot_0));
+ @SuppressWarnings("null")
+ final /*@NonNull*/ /*@Thrown*/ List<X> ownedX = sRoot_0.getOwnedX();
final /*@NonNull*/ /*@Thrown*/ OrderedSetValue BOXED_ownedX = idResolver.createOrderedSetOfAll(ORD_CLSSid_X, ownedX);
/*@NonNull*/ /*@Thrown*/ SequenceValue.Accumulator accumulator = ValueUtil.createSequenceAccumulatorValue(SEQ_CLSSid_A);
/*@Nullable*/ Iterator<?> ITERATOR__1 = BOXED_ownedX.iterator();
@@ -517,10 +525,10 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
*/
final /*@NonNull*/ /*@NonInvalid*/ Class TYP_target_c_c_A_0 = idResolver.getClass(CLSSid_A, null);
if (_1 == null) {
- throwNull(sRoot_0, "Null source for \'source::SElement::ast\'");
+ throwNull(sRoot_0, "Null source for \'\'http://cs2as/tests/example1/sourceMM/1.0\'::SElement::ast\'");
}
final /*@Nullable*/ /*@Thrown*/ EObject ast_0 = _1.getAst();
- final /*@Nullable*/ /*@Thrown*/ A oclAsType_0 = (A)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast_0, TYP_target_c_c_A_0);
+ final /*@NonNull*/ /*@Thrown*/ A oclAsType_0 = ClassUtil.nonNullState((A)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast_0, TYP_target_c_c_A_0));
//
accumulator.add(oclAsType_0);
}
@@ -551,6 +559,7 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
*/
protected boolean uA3_name(final /*@NonNull*/ /*@NonInvalid*/ X x_2) {
// predicates
+ final /*@NonNull*/ /*@NonInvalid*/ IdResolver idResolver = evaluator.getIdResolver();
final /*@Nullable*/ /*@Thrown*/ Boolean isA1 = x_2.isIsA1();
final /*@Nullable*/ /*@Thrown*/ Boolean not = BooleanNotOperation.INSTANCE.evaluate(isA1);
if (not != ValueUtil.TRUE_VALUE) {
@@ -561,12 +570,11 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
if (not_0 != ValueUtil.TRUE_VALUE) {
return false;
}
- final /*@NonNull*/ /*@NonInvalid*/ IdResolver idResolver = evaluator.getIdResolver();
final /*@NonNull*/ /*@NonInvalid*/ Class TYP_target_c_c_A3_0 = idResolver.getClass(CLSSid_A3, null);
// creations
// assignments
final /*@Nullable*/ /*@Thrown*/ EObject ast = x_2.getAst();
- final /*@Nullable*/ /*@Thrown*/ A3 oclAsType = (A3)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_A3_0);
+ final /*@NonNull*/ /*@Thrown*/ A3 oclAsType = ClassUtil.nonNullState((A3)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_A3_0));
final /*@Nullable*/ /*@Thrown*/ String name = x_2.getName();
oclAsType.setName(name);
// mapping statements
@@ -595,6 +603,7 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
*/
protected boolean uA3_ownsC(final /*@NonNull*/ /*@NonInvalid*/ X x_3) {
// predicates
+ final /*@NonNull*/ /*@NonInvalid*/ IdResolver idResolver = evaluator.getIdResolver();
final /*@Nullable*/ /*@Thrown*/ Boolean isA1 = x_3.isIsA1();
final /*@Nullable*/ /*@Thrown*/ Boolean not = BooleanNotOperation.INSTANCE.evaluate(isA1);
if (not != ValueUtil.TRUE_VALUE) {
@@ -605,14 +614,13 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
if (not_0 != ValueUtil.TRUE_VALUE) {
return false;
}
- final /*@NonNull*/ /*@NonInvalid*/ IdResolver idResolver = evaluator.getIdResolver();
final /*@NonNull*/ /*@NonInvalid*/ Class TYP_target_c_c_A3_0 = idResolver.getClass(CLSSid_A3, null);
// creations
// assignments
final /*@Nullable*/ /*@Thrown*/ EObject ast = x_3.getAst();
- final /*@Nullable*/ /*@Thrown*/ A3 oclAsType = (A3)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_A3_0);
- final /*@Nullable*/ /*@Thrown*/ List<Y> ownsY = x_3.getOwnsY();
- assert ownsY != null;
+ final /*@NonNull*/ /*@Thrown*/ A3 oclAsType = ClassUtil.nonNullState((A3)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_A3_0));
+ @SuppressWarnings("null")
+ final /*@NonNull*/ /*@Thrown*/ List<Y> ownsY = x_3.getOwnsY();
final /*@NonNull*/ /*@Thrown*/ OrderedSetValue BOXED_ownsY = idResolver.createOrderedSetOfAll(ORD_CLSSid_Y, ownsY);
/*@NonNull*/ /*@Thrown*/ SequenceValue.Accumulator accumulator = ValueUtil.createSequenceAccumulatorValue(SEQ_CLSSid_Y2);
/*@Nullable*/ Iterator<?> ITERATOR__1 = BOXED_ownsY.iterator();
@@ -627,28 +635,25 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
* oclAsType(source::Y2)
*/
final /*@NonNull*/ /*@NonInvalid*/ Class TYP_source_c_c_Y2_0 = idResolver.getClass(CLSSid_Y2, null);
- final /*@Nullable*/ /*@Thrown*/ Y2 oclAsType_0 = (Y2)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, _1, TYP_source_c_c_Y2_0);
+ final /*@NonNull*/ /*@Thrown*/ Y2 oclAsType_0 = ClassUtil.nonNullState((Y2)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, _1, TYP_source_c_c_Y2_0));
//
accumulator.add(oclAsType_0);
}
/*@NonNull*/ /*@Thrown*/ SequenceValue.Accumulator accumulator_0 = ValueUtil.createSequenceAccumulatorValue(SEQ_CLSSid_C);
- /*@Nullable*/ Iterator<?> ITERATOR__1_0 = collect_0.iterator();
+ /*@NonNull*/ Iterator<?> ITERATOR__1_0 = collect_0.iterator();
/*@NonNull*/ /*@Thrown*/ SequenceValue collect;
while (true) {
if (!ITERATOR__1_0.hasNext()) {
collect = accumulator_0;
break;
}
- /*@Nullable*/ /*@NonInvalid*/ Y2 _1_0 = (Y2)ITERATOR__1_0.next();
+ /*@NonNull*/ /*@NonInvalid*/ Y2 _1_0 = (Y2)ITERATOR__1_0.next();
/**
* ast.oclAsType(target::C)
*/
final /*@NonNull*/ /*@NonInvalid*/ Class TYP_target_c_c_C_0 = idResolver.getClass(CLSSid_C, null);
- if (_1_0 == null) {
- throwNull(x_3, "Null source for \'source::SElement::ast\'");
- }
final /*@Nullable*/ /*@Thrown*/ EObject ast_0 = _1_0.getAst();
- final /*@Nullable*/ /*@Thrown*/ C oclAsType_1 = (C)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast_0, TYP_target_c_c_C_0);
+ final /*@NonNull*/ /*@Thrown*/ C oclAsType_1 = ClassUtil.nonNullState((C)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast_0, TYP_target_c_c_C_0));
//
accumulator_0.add(oclAsType_1);
}
@@ -679,6 +684,7 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
*/
protected boolean uA2_name(final /*@NonNull*/ /*@NonInvalid*/ X x_4) {
// predicates
+ final /*@NonNull*/ /*@NonInvalid*/ IdResolver idResolver = evaluator.getIdResolver();
final /*@Nullable*/ /*@Thrown*/ Boolean isA2 = x_4.isIsA2();
if (isA2 != ValueUtil.TRUE_VALUE) {
return false;
@@ -688,12 +694,11 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
if (not != ValueUtil.TRUE_VALUE) {
return false;
}
- final /*@NonNull*/ /*@NonInvalid*/ IdResolver idResolver = evaluator.getIdResolver();
final /*@NonNull*/ /*@NonInvalid*/ Class TYP_target_c_c_A2_0 = idResolver.getClass(CLSSid_A2, null);
// creations
// assignments
final /*@Nullable*/ /*@Thrown*/ EObject ast = x_4.getAst();
- final /*@Nullable*/ /*@Thrown*/ A2 oclAsType = (A2)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_A2_0);
+ final /*@NonNull*/ /*@Thrown*/ A2 oclAsType = ClassUtil.nonNullState((A2)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_A2_0));
final /*@Nullable*/ /*@Thrown*/ String name = x_4.getName();
oclAsType.setName(name);
// mapping statements
@@ -722,6 +727,7 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
*/
protected boolean uA2_ownsC(final /*@NonNull*/ /*@NonInvalid*/ X x_5) {
// predicates
+ final /*@NonNull*/ /*@NonInvalid*/ IdResolver idResolver = evaluator.getIdResolver();
final /*@Nullable*/ /*@Thrown*/ Boolean isA2 = x_5.isIsA2();
if (isA2 != ValueUtil.TRUE_VALUE) {
return false;
@@ -731,14 +737,13 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
if (not != ValueUtil.TRUE_VALUE) {
return false;
}
- final /*@NonNull*/ /*@NonInvalid*/ IdResolver idResolver = evaluator.getIdResolver();
final /*@NonNull*/ /*@NonInvalid*/ Class TYP_target_c_c_A2_0 = idResolver.getClass(CLSSid_A2, null);
// creations
// assignments
final /*@Nullable*/ /*@Thrown*/ EObject ast = x_5.getAst();
- final /*@Nullable*/ /*@Thrown*/ A2 oclAsType = (A2)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_A2_0);
- final /*@Nullable*/ /*@Thrown*/ List<Y> ownsY = x_5.getOwnsY();
- assert ownsY != null;
+ final /*@NonNull*/ /*@Thrown*/ A2 oclAsType = ClassUtil.nonNullState((A2)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_A2_0));
+ @SuppressWarnings("null")
+ final /*@NonNull*/ /*@Thrown*/ List<Y> ownsY = x_5.getOwnsY();
final /*@NonNull*/ /*@Thrown*/ OrderedSetValue BOXED_ownsY = idResolver.createOrderedSetOfAll(ORD_CLSSid_Y, ownsY);
/*@NonNull*/ /*@Thrown*/ SequenceValue.Accumulator accumulator = ValueUtil.createSequenceAccumulatorValue(SEQ_CLSSid_Y2);
/*@Nullable*/ Iterator<?> ITERATOR__1 = BOXED_ownsY.iterator();
@@ -753,28 +758,25 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
* oclAsType(source::Y2)
*/
final /*@NonNull*/ /*@NonInvalid*/ Class TYP_source_c_c_Y2_0 = idResolver.getClass(CLSSid_Y2, null);
- final /*@Nullable*/ /*@Thrown*/ Y2 oclAsType_0 = (Y2)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, _1, TYP_source_c_c_Y2_0);
+ final /*@NonNull*/ /*@Thrown*/ Y2 oclAsType_0 = ClassUtil.nonNullState((Y2)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, _1, TYP_source_c_c_Y2_0));
//
accumulator.add(oclAsType_0);
}
/*@NonNull*/ /*@Thrown*/ SequenceValue.Accumulator accumulator_0 = ValueUtil.createSequenceAccumulatorValue(SEQ_CLSSid_C);
- /*@Nullable*/ Iterator<?> ITERATOR__1_0 = collect_0.iterator();
+ /*@NonNull*/ Iterator<?> ITERATOR__1_0 = collect_0.iterator();
/*@NonNull*/ /*@Thrown*/ SequenceValue collect;
while (true) {
if (!ITERATOR__1_0.hasNext()) {
collect = accumulator_0;
break;
}
- /*@Nullable*/ /*@NonInvalid*/ Y2 _1_0 = (Y2)ITERATOR__1_0.next();
+ /*@NonNull*/ /*@NonInvalid*/ Y2 _1_0 = (Y2)ITERATOR__1_0.next();
/**
* ast.oclAsType(target::C)
*/
final /*@NonNull*/ /*@NonInvalid*/ Class TYP_target_c_c_C_0 = idResolver.getClass(CLSSid_C, null);
- if (_1_0 == null) {
- throwNull(x_5, "Null source for \'source::SElement::ast\'");
- }
final /*@Nullable*/ /*@Thrown*/ EObject ast_0 = _1_0.getAst();
- final /*@Nullable*/ /*@Thrown*/ C oclAsType_1 = (C)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast_0, TYP_target_c_c_C_0);
+ final /*@NonNull*/ /*@Thrown*/ C oclAsType_1 = ClassUtil.nonNullState((C)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast_0, TYP_target_c_c_C_0));
//
accumulator_0.add(oclAsType_1);
}
@@ -804,16 +806,16 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
*/
protected boolean uA1_name(final /*@NonNull*/ /*@NonInvalid*/ X x_6) {
// predicates
+ final /*@NonNull*/ /*@NonInvalid*/ IdResolver idResolver = evaluator.getIdResolver();
final /*@Nullable*/ /*@Thrown*/ Boolean isA1 = x_6.isIsA1();
if (isA1 != ValueUtil.TRUE_VALUE) {
return false;
}
- final /*@NonNull*/ /*@NonInvalid*/ IdResolver idResolver = evaluator.getIdResolver();
final /*@NonNull*/ /*@NonInvalid*/ Class TYP_target_c_c_A1_0 = idResolver.getClass(CLSSid_A1, null);
// creations
// assignments
final /*@Nullable*/ /*@Thrown*/ EObject ast = x_6.getAst();
- final /*@Nullable*/ /*@Thrown*/ A1 oclAsType = (A1)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_A1_0);
+ final /*@NonNull*/ /*@Thrown*/ A1 oclAsType = ClassUtil.nonNullState((A1)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_A1_0));
final /*@Nullable*/ /*@Thrown*/ String name = x_6.getName();
oclAsType.setName(name);
// mapping statements
@@ -841,18 +843,18 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
*/
protected boolean uA1_ownsB(final /*@NonNull*/ /*@NonInvalid*/ X x_7) {
// predicates
+ final /*@NonNull*/ /*@NonInvalid*/ IdResolver idResolver = evaluator.getIdResolver();
final /*@Nullable*/ /*@Thrown*/ Boolean isA1 = x_7.isIsA1();
if (isA1 != ValueUtil.TRUE_VALUE) {
return false;
}
- final /*@NonNull*/ /*@NonInvalid*/ IdResolver idResolver = evaluator.getIdResolver();
final /*@NonNull*/ /*@NonInvalid*/ Class TYP_target_c_c_A1_0 = idResolver.getClass(CLSSid_A1, null);
// creations
// assignments
final /*@Nullable*/ /*@Thrown*/ EObject ast = x_7.getAst();
- final /*@Nullable*/ /*@Thrown*/ A1 oclAsType = (A1)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_A1_0);
- final /*@Nullable*/ /*@Thrown*/ List<Y> ownsY = x_7.getOwnsY();
- assert ownsY != null;
+ final /*@NonNull*/ /*@Thrown*/ A1 oclAsType = ClassUtil.nonNullState((A1)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_A1_0));
+ @SuppressWarnings("null")
+ final /*@NonNull*/ /*@Thrown*/ List<Y> ownsY = x_7.getOwnsY();
final /*@NonNull*/ /*@Thrown*/ OrderedSetValue BOXED_ownsY = idResolver.createOrderedSetOfAll(ORD_CLSSid_Y, ownsY);
/*@NonNull*/ /*@Thrown*/ SequenceValue.Accumulator accumulator = ValueUtil.createSequenceAccumulatorValue(SEQ_CLSSid_Y1);
/*@Nullable*/ Iterator<?> ITERATOR__1 = BOXED_ownsY.iterator();
@@ -867,28 +869,25 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
* oclAsType(source::Y1)
*/
final /*@NonNull*/ /*@NonInvalid*/ Class TYP_source_c_c_Y1_0 = idResolver.getClass(CLSSid_Y1, null);
- final /*@Nullable*/ /*@Thrown*/ Y1 oclAsType_0 = (Y1)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, _1, TYP_source_c_c_Y1_0);
+ final /*@NonNull*/ /*@Thrown*/ Y1 oclAsType_0 = ClassUtil.nonNullState((Y1)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, _1, TYP_source_c_c_Y1_0));
//
accumulator.add(oclAsType_0);
}
/*@NonNull*/ /*@Thrown*/ SequenceValue.Accumulator accumulator_0 = ValueUtil.createSequenceAccumulatorValue(SEQ_CLSSid_B);
- /*@Nullable*/ Iterator<?> ITERATOR__1_0 = collect_0.iterator();
+ /*@NonNull*/ Iterator<?> ITERATOR__1_0 = collect_0.iterator();
/*@NonNull*/ /*@Thrown*/ SequenceValue collect;
while (true) {
if (!ITERATOR__1_0.hasNext()) {
collect = accumulator_0;
break;
}
- /*@Nullable*/ /*@NonInvalid*/ Y1 _1_0 = (Y1)ITERATOR__1_0.next();
+ /*@NonNull*/ /*@NonInvalid*/ Y1 _1_0 = (Y1)ITERATOR__1_0.next();
/**
* ast.oclAsType(target::B)
*/
final /*@NonNull*/ /*@NonInvalid*/ Class TYP_target_c_c_B_0 = idResolver.getClass(CLSSid_B, null);
- if (_1_0 == null) {
- throwNull(x_7, "Null source for \'source::SElement::ast\'");
- }
final /*@Nullable*/ /*@Thrown*/ EObject ast_0 = _1_0.getAst();
- final /*@Nullable*/ /*@Thrown*/ B oclAsType_1 = (B)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast_0, TYP_target_c_c_B_0);
+ final /*@NonNull*/ /*@Thrown*/ B oclAsType_1 = ClassUtil.nonNullState((B)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast_0, TYP_target_c_c_B_0));
//
accumulator_0.add(oclAsType_1);
}
@@ -923,13 +922,13 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
// creations
// assignments
final /*@Nullable*/ /*@Thrown*/ EObject ast = y1_0.getAst();
- final /*@Nullable*/ /*@Thrown*/ B oclAsType = (B)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_B_0);
+ final /*@NonNull*/ /*@Thrown*/ B oclAsType = ClassUtil.nonNullState((B)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_B_0));
final /*@Nullable*/ /*@Thrown*/ Z ownsZ = y1_0.getOwnsZ();
if (ownsZ == null) {
- throwNull(y1_0, "Null source for \'source::SElement::ast\'");
+ throwNull(y1_0, "Null source for \'\'http://cs2as/tests/example1/sourceMM/1.0\'::SElement::ast\'");
}
final /*@Nullable*/ /*@Thrown*/ EObject ast_0 = ownsZ.getAst();
- final /*@Nullable*/ /*@Thrown*/ D oclAsType_0 = (D)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast_0, TYP_target_c_c_D_0);
+ final /*@NonNull*/ /*@Thrown*/ D oclAsType_0 = ClassUtil.nonNullState((D)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast_0, TYP_target_c_c_D_0));
oclAsType.setOwnsD(oclAsType_0);
// mapping statements
return true;
@@ -957,7 +956,7 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
// creations
// assignments
final /*@Nullable*/ /*@Thrown*/ EObject ast = y1_1.getAst();
- final /*@Nullable*/ /*@Thrown*/ B oclAsType = (B)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_B_0);
+ final /*@NonNull*/ /*@Thrown*/ B oclAsType = ClassUtil.nonNullState((B)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_B_0));
final /*@Nullable*/ /*@Thrown*/ String name = y1_1.getName();
oclAsType.setName(name);
// mapping statements
@@ -988,13 +987,13 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
// creations
// assignments
final /*@Nullable*/ /*@Thrown*/ EObject ast = y2_0.getAst();
- final /*@Nullable*/ /*@Thrown*/ C oclAsType = (C)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_C_0);
+ final /*@NonNull*/ /*@Thrown*/ C oclAsType = ClassUtil.nonNullState((C)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_C_0));
final /*@Nullable*/ /*@Thrown*/ Z ownsZ = y2_0.getOwnsZ();
if (ownsZ == null) {
- throwNull(y2_0, "Null source for \'source::SElement::ast\'");
+ throwNull(y2_0, "Null source for \'\'http://cs2as/tests/example1/sourceMM/1.0\'::SElement::ast\'");
}
final /*@Nullable*/ /*@Thrown*/ EObject ast_0 = ownsZ.getAst();
- final /*@Nullable*/ /*@Thrown*/ D oclAsType_0 = (D)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast_0, TYP_target_c_c_D_0);
+ final /*@NonNull*/ /*@Thrown*/ D oclAsType_0 = ClassUtil.nonNullState((D)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast_0, TYP_target_c_c_D_0));
oclAsType.setOwnsD(oclAsType_0);
// mapping statements
return true;
@@ -1022,7 +1021,7 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
// creations
// assignments
final /*@Nullable*/ /*@Thrown*/ EObject ast = y2_1.getAst();
- final /*@Nullable*/ /*@Thrown*/ C oclAsType = (C)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_C_0);
+ final /*@NonNull*/ /*@Thrown*/ C oclAsType = ClassUtil.nonNullState((C)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_C_0));
final /*@Nullable*/ /*@Thrown*/ String name = y2_1.getName();
oclAsType.setName(name);
// mapping statements
@@ -1064,16 +1063,10 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
// creations
// assignments
final /*@Nullable*/ /*@Thrown*/ EObject ast = z_1.getAst();
- final /*@Nullable*/ /*@Thrown*/ D oclAsType = (D)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_D_0);
- final /*@Nullable*/ /*@Thrown*/ Y2 oclAsType_0 = (Y2)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, toY, TYP_source_c_c_Y2_0);
- if (oclAsType_0 == null) {
- throwNull(z_1, "Null source for \'source::SElement::ast\'");
- }
+ final /*@NonNull*/ /*@Thrown*/ D oclAsType = ClassUtil.nonNullState((D)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_D_0));
+ final /*@NonNull*/ /*@Thrown*/ Y2 oclAsType_0 = ClassUtil.nonNullState((Y2)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, toY, TYP_source_c_c_Y2_0));
final /*@Nullable*/ /*@Thrown*/ EObject ast_0 = oclAsType_0.getAst();
- final /*@Nullable*/ /*@Thrown*/ C oclAsType_1 = (C)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast_0, TYP_target_c_c_C_0);
- if (oclAsType_1 == null) {
- throwNull(z_1, "Null source for \'target::C::toA2\'");
- }
+ final /*@NonNull*/ /*@Thrown*/ C oclAsType_1 = ClassUtil.nonNullState((C)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast_0, TYP_target_c_c_C_0));
final /*@Nullable*/ /*@Thrown*/ A2 toA2 = oclAsType_1.getToA2();
oclAsType.setToA(toA2);
// mapping statements
@@ -1113,8 +1106,8 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
final /*@Nullable*/ /*@Thrown*/ EObject ast = z_2.getAst();
// creations
// assignments
- final /*@Nullable*/ /*@Thrown*/ D oclAsType = (D)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_D_0);
- final /*@Nullable*/ /*@Thrown*/ D self_1 = (D)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_D_0);
+ final /*@NonNull*/ /*@Thrown*/ D oclAsType = ClassUtil.nonNullState((D)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_D_0));
+ final /*@NonNull*/ /*@Thrown*/ D self_1 = ClassUtil.nonNullState((D)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_D_0));
final /*@Nullable*/ /*@Thrown*/ PathNameCS refers = z_2.getRefers();
final /*@Thrown*/ boolean eq = refers == null;
/*@Nullable*/ /*@Thrown*/ C symbol_2;
@@ -1123,10 +1116,10 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
}
else {
if (refers == null) {
- throwNull(z_2, "Null source for \'source::PathNameCS::path\'");
+ throwNull(z_2, "Null source for \'\'http://cs2as/tests/example1/sourceMM/1.0\'::PathNameCS::path\'");
}
- final /*@Nullable*/ /*@Thrown*/ List<PathElementCS> pathSeq_0 = refers.getPath();
- assert pathSeq_0 != null;
+ @SuppressWarnings("null")
+ final /*@NonNull*/ /*@Thrown*/ List<PathElementCS> pathSeq_0 = refers.getPath();
final /*@NonNull*/ /*@Thrown*/ OrderedSetValue BOXED_pathSeq_0_0 = idResolver.createOrderedSetOfAll(ORD_CLSSid_PathElementCS, pathSeq_0);
final /*@NonNull*/ /*@Thrown*/ IntegerValue size = CollectionSizeOperation.INSTANCE.evaluate(BOXED_pathSeq_0_0);
final /*@Thrown*/ boolean eq_0 = size.equals(INT_1);
@@ -1145,18 +1138,22 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
symbol_1 = _lookupC;
}
else {
- if (self_1 == null) {
- throwNull(z_2, "Null source for \'target::Visitable::lookupNamespace(OrderedSet(source::PathElementCS)) : target::Namespace[?]\'");
- }
final /*@NonNull*/ /*@Thrown*/ IntegerValue diff = (IntegerValue)NumericMinusOperation.INSTANCE.evaluate(size, INT_1);
final /*@NonNull*/ /*@Thrown*/ OrderedSetValue subOrderedSet = OrderedSetSubOrderedSetOperation.INSTANCE.evaluate(BOXED_pathSeq_0_0, INT_1, diff);
final List<PathElementCS> UNBOXED_subOrderedSet = subOrderedSet.asEcoreObjects(idResolver, PathElementCS.class);
assert UNBOXED_subOrderedSet != null;
final /*@Nullable*/ /*@Thrown*/ Namespace lookupNamespace = this.lookupNamespace(self_1, UNBOXED_subOrderedSet);
- final /*@Thrown*/ boolean symbol_0 = lookupNamespace == null;
- /*@Nullable*/ /*@Thrown*/ C safe__lookupC;
- if (symbol_0) {
- safe__lookupC = null;
+ /*@Nullable*/ /*@Caught*/ Object CAUGHT_lookupNamespace;
+ try {
+ CAUGHT_lookupNamespace = lookupNamespace;
+ }
+ catch (Exception e) {
+ CAUGHT_lookupNamespace = ValueUtil.createInvalidValue(e);
+ }
+ final /*@NonNull*/ /*@NonInvalid*/ Object symbol_0 = CAUGHT_lookupNamespace == null;
+ /*@Nullable*/ /*@Thrown*/ C safe__lookupC_source;
+ if (symbol_0 == Boolean.TRUE) {
+ safe__lookupC_source = null;
}
else {
final /*@Nullable*/ /*@Thrown*/ PathElementCS last = (PathElementCS)OrderedCollectionLastOperation.INSTANCE.evaluate(BOXED_pathSeq_0_0);
@@ -1169,9 +1166,9 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
} else {
handleLookupError(z_2,last);
};
- safe__lookupC = _lookupC_0;
+ safe__lookupC_source = _lookupC_0;
}
- symbol_1 = safe__lookupC;
+ symbol_1 = safe__lookupC_source;
}
symbol_2 = symbol_1;
}
@@ -1213,16 +1210,10 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
// creations
// assignments
final /*@Nullable*/ /*@Thrown*/ EObject ast = z_3.getAst();
- final /*@Nullable*/ /*@Thrown*/ D oclAsType = (D)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_D_0);
- final /*@Nullable*/ /*@Thrown*/ Y1 oclAsType_0 = (Y1)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, toY, TYP_source_c_c_Y1_0);
- if (oclAsType_0 == null) {
- throwNull(z_3, "Null source for \'source::SElement::ast\'");
- }
+ final /*@NonNull*/ /*@Thrown*/ D oclAsType = ClassUtil.nonNullState((D)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_D_0));
+ final /*@NonNull*/ /*@Thrown*/ Y1 oclAsType_0 = ClassUtil.nonNullState((Y1)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, toY, TYP_source_c_c_Y1_0));
final /*@Nullable*/ /*@Thrown*/ EObject ast_0 = oclAsType_0.getAst();
- final /*@Nullable*/ /*@Thrown*/ B oclAsType_1 = (B)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast_0, TYP_target_c_c_B_0);
- if (oclAsType_1 == null) {
- throwNull(z_3, "Null source for \'target::B::toA1\'");
- }
+ final /*@NonNull*/ /*@Thrown*/ B oclAsType_1 = ClassUtil.nonNullState((B)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast_0, TYP_target_c_c_B_0));
final /*@Nullable*/ /*@Thrown*/ A1 toA1 = oclAsType_1.getToA1();
oclAsType.setToA(toA1);
// mapping statements
@@ -1261,8 +1252,8 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
final /*@Nullable*/ /*@Thrown*/ EObject ast = z_4.getAst();
// creations
// assignments
- final /*@Nullable*/ /*@Thrown*/ D oclAsType = (D)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_D_0);
- final /*@Nullable*/ /*@Thrown*/ D self_1 = (D)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_D_0);
+ final /*@NonNull*/ /*@Thrown*/ D oclAsType = ClassUtil.nonNullState((D)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_D_0));
+ final /*@NonNull*/ /*@Thrown*/ D self_1 = ClassUtil.nonNullState((D)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_target_c_c_D_0));
final /*@Nullable*/ /*@Thrown*/ PathNameCS refers = z_4.getRefers();
final /*@Thrown*/ boolean eq = refers == null;
/*@Nullable*/ /*@Thrown*/ B symbol_2;
@@ -1271,10 +1262,10 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
}
else {
if (refers == null) {
- throwNull(z_4, "Null source for \'source::PathNameCS::path\'");
+ throwNull(z_4, "Null source for \'\'http://cs2as/tests/example1/sourceMM/1.0\'::PathNameCS::path\'");
}
- final /*@Nullable*/ /*@Thrown*/ List<PathElementCS> pathSeq_0 = refers.getPath();
- assert pathSeq_0 != null;
+ @SuppressWarnings("null")
+ final /*@NonNull*/ /*@Thrown*/ List<PathElementCS> pathSeq_0 = refers.getPath();
final /*@NonNull*/ /*@Thrown*/ OrderedSetValue BOXED_pathSeq_0_0 = idResolver.createOrderedSetOfAll(ORD_CLSSid_PathElementCS, pathSeq_0);
final /*@NonNull*/ /*@Thrown*/ IntegerValue size = CollectionSizeOperation.INSTANCE.evaluate(BOXED_pathSeq_0_0);
final /*@Thrown*/ boolean eq_0 = size.equals(INT_1);
@@ -1293,18 +1284,22 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
symbol_1 = _lookupB;
}
else {
- if (self_1 == null) {
- throwNull(z_4, "Null source for \'target::Visitable::lookupNamespace(OrderedSet(source::PathElementCS)) : target::Namespace[?]\'");
- }
final /*@NonNull*/ /*@Thrown*/ IntegerValue diff = (IntegerValue)NumericMinusOperation.INSTANCE.evaluate(size, INT_1);
final /*@NonNull*/ /*@Thrown*/ OrderedSetValue subOrderedSet = OrderedSetSubOrderedSetOperation.INSTANCE.evaluate(BOXED_pathSeq_0_0, INT_1, diff);
final List<PathElementCS> UNBOXED_subOrderedSet = subOrderedSet.asEcoreObjects(idResolver, PathElementCS.class);
assert UNBOXED_subOrderedSet != null;
final /*@Nullable*/ /*@Thrown*/ Namespace lookupNamespace = this.lookupNamespace(self_1, UNBOXED_subOrderedSet);
- final /*@Thrown*/ boolean symbol_0 = lookupNamespace == null;
- /*@Nullable*/ /*@Thrown*/ B safe__lookupB;
- if (symbol_0) {
- safe__lookupB = null;
+ /*@Nullable*/ /*@Caught*/ Object CAUGHT_lookupNamespace;
+ try {
+ CAUGHT_lookupNamespace = lookupNamespace;
+ }
+ catch (Exception e) {
+ CAUGHT_lookupNamespace = ValueUtil.createInvalidValue(e);
+ }
+ final /*@NonNull*/ /*@NonInvalid*/ Object symbol_0 = CAUGHT_lookupNamespace == null;
+ /*@Nullable*/ /*@Thrown*/ B safe__lookupB_source;
+ if (symbol_0 == Boolean.TRUE) {
+ safe__lookupB_source = null;
}
else {
final /*@Nullable*/ /*@Thrown*/ PathElementCS last = (PathElementCS)OrderedCollectionLastOperation.INSTANCE.evaluate(BOXED_pathSeq_0_0);
@@ -1317,9 +1312,9 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
} else {
handleLookupError(z_4,last);
};
- safe__lookupB = _lookupB_0;
+ safe__lookupB_source = _lookupB_0;
}
- symbol_1 = safe__lookupB;
+ symbol_1 = safe__lookupB_source;
}
symbol_2 = symbol_1;
}
@@ -1458,11 +1453,11 @@ public class Source2Target_qvtp_qvtias extends CS2ASTransformationExecutor
final /*@NonNull*/ /*@NonInvalid*/ Class TYP_source_c_c_Y1_2 = idResolver.getClass(CLSSid_Y1, null);
final /*@NonNull*/ /*@NonInvalid*/ Class TYP_source_c_c_Y2_2 = idResolver.getClass(CLSSid_Y2, null);
final /*@NonNull*/ /*@NonInvalid*/ Class TYP_source_c_c_Z_5 = idResolver.getClass(CLSSid_Z, null);
- final /*@NonNull*/ /*@Thrown*/ SetValue allInstances_3 = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_SRoot, TYP_source_c_c_SRoot_1);
- final /*@NonNull*/ /*@Thrown*/ SetValue allInstances_1 = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_X, TYP_source_c_c_X_8);
- final /*@NonNull*/ /*@Thrown*/ SetValue allInstances_15 = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_Y1, TYP_source_c_c_Y1_2);
- final /*@NonNull*/ /*@Thrown*/ SetValue allInstances_17 = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_Y2, TYP_source_c_c_Y2_2);
- final /*@NonNull*/ /*@Thrown*/ SetValue allInstances_7 = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_Z, TYP_source_c_c_Z_5);
+ final /*@NonNull*/ /*@NonInvalid*/ SetValue allInstances_3 = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_SRoot, TYP_source_c_c_SRoot_1);
+ final /*@NonNull*/ /*@NonInvalid*/ SetValue allInstances_1 = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_X, TYP_source_c_c_X_8);
+ final /*@NonNull*/ /*@NonInvalid*/ SetValue allInstances_15 = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_Y1, TYP_source_c_c_Y1_2);
+ final /*@NonNull*/ /*@NonInvalid*/ SetValue allInstances_17 = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_Y2, TYP_source_c_c_Y2_2);
+ final /*@NonNull*/ /*@NonInvalid*/ SetValue allInstances_7 = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_Z, TYP_source_c_c_Z_5);
final List<SRoot> UNBOXED_allInstances_3 = allInstances_3.asEcoreObjects(idResolver, SRoot.class);
assert UNBOXED_allInstances_3 != null;
final List<X> UNBOXED_allInstances_1 = allInstances_1.asEcoreObjects(idResolver, X.class);
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/cg/classescs2as_qvtp_qvtias.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/cg/classescs2as_qvtp_qvtias.java
index c3b6043ad..c8fb388a9 100644
--- a/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/cg/classescs2as_qvtp_qvtias.java
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/cg/classescs2as_qvtp_qvtias.java
@@ -42,6 +42,7 @@ import org.eclipse.ocl.pivot.library.collection.OrderedCollectionLastOperation;
import org.eclipse.ocl.pivot.library.collection.OrderedSetSubOrderedSetOperation;
import org.eclipse.ocl.pivot.library.numeric.NumericMinusOperation;
import org.eclipse.ocl.pivot.library.oclany.OclAnyOclAsTypeOperation;
+import org.eclipse.ocl.pivot.utilities.ClassUtil;
import org.eclipse.ocl.pivot.utilities.ValueUtil;
import org.eclipse.ocl.pivot.values.IntegerValue;
import org.eclipse.ocl.pivot.values.OrderedSetValue;
@@ -136,8 +137,8 @@ public class classescs2as_qvtp_qvtias extends CS2ASTransformationExecutor
public /*@Nullable*/ /*@NonInvalid*/ Package lookupPackage(final /*@NonNull*/ /*@NonInvalid*/ Visitable self_0, final /*@NonNull*/ /*@NonInvalid*/ List<PathElementCS> pathSeq) {
final /*@NonNull*/ /*@NonInvalid*/ IdResolver idResolver = evaluator.getIdResolver();
final /*@NonNull*/ /*@NonInvalid*/ OrderedSetValue BOXED_pathSeq_3 = idResolver.createOrderedSetOfAll(ORD_CLSSid_PathElementCS, pathSeq);
- final /*@NonNull*/ /*@Thrown*/ IntegerValue size = CollectionSizeOperation.INSTANCE.evaluate(BOXED_pathSeq_3);
- final /*@Thrown*/ boolean eq = size.equals(INT_1);
+ final /*@NonNull*/ /*@NonInvalid*/ IntegerValue size = CollectionSizeOperation.INSTANCE.evaluate(BOXED_pathSeq_3);
+ final /*@NonInvalid*/ boolean eq = size.equals(INT_1);
/*@Nullable*/ /*@Thrown*/ Package symbol_0;
if (eq) {
final /*@Nullable*/ /*@Thrown*/ PathElementCS first = (PathElementCS)OrderedCollectionFirstOperation.INSTANCE.evaluate(BOXED_pathSeq_3);
@@ -153,7 +154,7 @@ public class classescs2as_qvtp_qvtias extends CS2ASTransformationExecutor
symbol_0 = _lookupPackage;
}
else {
- final /*@NonNull*/ /*@Thrown*/ IntegerValue diff = (IntegerValue)NumericMinusOperation.INSTANCE.evaluate(size, INT_1);
+ final /*@NonNull*/ /*@NonInvalid*/ IntegerValue diff = (IntegerValue)NumericMinusOperation.INSTANCE.evaluate(size, INT_1);
final /*@NonNull*/ /*@Thrown*/ OrderedSetValue subOrderedSet = OrderedSetSubOrderedSetOperation.INSTANCE.evaluate(BOXED_pathSeq_3, INT_1, diff);
final List<PathElementCS> UNBOXED_subOrderedSet = subOrderedSet.asEcoreObjects(idResolver, PathElementCS.class);
assert UNBOXED_subOrderedSet != null;
@@ -276,7 +277,7 @@ public class classescs2as_qvtp_qvtias extends CS2ASTransformationExecutor
// creations
// assignments
final /*@Nullable*/ /*@Thrown*/ EObject ast = classCS_0.getAst();
- final /*@Nullable*/ /*@Thrown*/ example2.classes.Class oclAsType = (example2.classes.Class)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_classes_c_c_Class_0);
+ final /*@NonNull*/ /*@Thrown*/ example2.classes.Class oclAsType = ClassUtil.nonNullState((example2.classes.Class)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_classes_c_c_Class_0));
final /*@Nullable*/ /*@Thrown*/ String name = classCS_0.getName();
oclAsType.setName(name);
// mapping statements
@@ -307,8 +308,8 @@ public class classescs2as_qvtp_qvtias extends CS2ASTransformationExecutor
final /*@Nullable*/ /*@Thrown*/ EObject ast = classCS_1.getAst();
// creations
// assignments
- final /*@Nullable*/ /*@Thrown*/ example2.classes.Class oclAsType = (example2.classes.Class)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_classes_c_c_Class_0);
- final /*@Nullable*/ /*@Thrown*/ example2.classes.Class self_1 = (example2.classes.Class)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_classes_c_c_Class_0);
+ final /*@NonNull*/ /*@Thrown*/ example2.classes.Class oclAsType = ClassUtil.nonNullState((example2.classes.Class)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_classes_c_c_Class_0));
+ final /*@NonNull*/ /*@Thrown*/ example2.classes.Class self_1 = ClassUtil.nonNullState((example2.classes.Class)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_classes_c_c_Class_0));
final /*@Nullable*/ /*@Thrown*/ PathNameCS symbol_0 = classCS_1.getExtends();
final /*@Thrown*/ boolean eq = symbol_0 == null;
/*@Nullable*/ /*@Thrown*/ example2.classes.Class symbol_3;
@@ -317,10 +318,10 @@ public class classescs2as_qvtp_qvtias extends CS2ASTransformationExecutor
}
else {
if (symbol_0 == null) {
- throwNull(classCS_1, "Null source for \'classescs::PathNameCS::path\'");
+ throwNull(classCS_1, "Null source for \'\'http://cs2as/tests/example2/classescs/1.0\'::PathNameCS::path\'");
}
- final /*@Nullable*/ /*@Thrown*/ List<PathElementCS> pathSeq_0 = symbol_0.getPath();
- assert pathSeq_0 != null;
+ @SuppressWarnings("null")
+ final /*@NonNull*/ /*@Thrown*/ List<PathElementCS> pathSeq_0 = symbol_0.getPath();
final /*@NonNull*/ /*@Thrown*/ OrderedSetValue BOXED_pathSeq_0_3 = idResolver.createOrderedSetOfAll(ORD_CLSSid_PathElementCS, pathSeq_0);
final /*@NonNull*/ /*@Thrown*/ IntegerValue size = CollectionSizeOperation.INSTANCE.evaluate(BOXED_pathSeq_0_3);
final /*@Thrown*/ boolean eq_0 = size.equals(INT_1);
@@ -339,9 +340,6 @@ public class classescs2as_qvtp_qvtias extends CS2ASTransformationExecutor
symbol_2 = _lookupClass;
}
else {
- if (self_1 == null) {
- throwNull(classCS_1, "Null source for \'classes::Visitable::lookupPackage(OrderedSet(classescs::PathElementCS)) : classes::Package[?]\'");
- }
final /*@NonNull*/ /*@Thrown*/ IntegerValue diff = (IntegerValue)NumericMinusOperation.INSTANCE.evaluate(size, INT_1);
final /*@NonNull*/ /*@Thrown*/ OrderedSetValue subOrderedSet = OrderedSetSubOrderedSetOperation.INSTANCE.evaluate(BOXED_pathSeq_0_3, INT_1, diff);
final List<PathElementCS> UNBOXED_subOrderedSet = subOrderedSet.asEcoreObjects(idResolver, PathElementCS.class);
@@ -388,7 +386,7 @@ public class classescs2as_qvtp_qvtias extends CS2ASTransformationExecutor
// creations
// assignments
final /*@Nullable*/ /*@Thrown*/ EObject ast = packageCS_0.getAst();
- final /*@Nullable*/ /*@Thrown*/ Package oclAsType = (Package)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_classes_c_c_Package_0);
+ final /*@NonNull*/ /*@Thrown*/ Package oclAsType = ClassUtil.nonNullState((Package)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_classes_c_c_Package_0));
final /*@Nullable*/ /*@Thrown*/ String name = packageCS_0.getName();
oclAsType.setName(name);
// mapping statements
@@ -419,9 +417,9 @@ public class classescs2as_qvtp_qvtias extends CS2ASTransformationExecutor
// creations
// assignments
final /*@Nullable*/ /*@Thrown*/ EObject ast = packageCS_1.getAst();
- final /*@Nullable*/ /*@Thrown*/ Package oclAsType = (Package)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_classes_c_c_Package_0);
- final /*@Nullable*/ /*@Thrown*/ List<ClassCS> ownedClasses = packageCS_1.getOwnedClasses();
- assert ownedClasses != null;
+ final /*@NonNull*/ /*@Thrown*/ Package oclAsType = ClassUtil.nonNullState((Package)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_classes_c_c_Package_0));
+ @SuppressWarnings("null")
+ final /*@NonNull*/ /*@Thrown*/ List<ClassCS> ownedClasses = packageCS_1.getOwnedClasses();
final /*@NonNull*/ /*@Thrown*/ OrderedSetValue BOXED_ownedClasses = idResolver.createOrderedSetOfAll(ORD_CLSSid_ClassCS, ownedClasses);
/*@NonNull*/ /*@Thrown*/ SequenceValue.Accumulator accumulator = ValueUtil.createSequenceAccumulatorValue(SEQ_CLSSid_Class);
/*@Nullable*/ Iterator<?> ITERATOR__1 = BOXED_ownedClasses.iterator();
@@ -437,10 +435,10 @@ public class classescs2as_qvtp_qvtias extends CS2ASTransformationExecutor
*/
final /*@NonNull*/ /*@NonInvalid*/ org.eclipse.ocl.pivot.Class TYP_classes_c_c_Class_0 = idResolver.getClass(CLSSid_Class, null);
if (_1 == null) {
- throwNull(packageCS_1, "Null source for \'classescs::ElementCS::ast\'");
+ throwNull(packageCS_1, "Null source for \'\'http://cs2as/tests/example2/classescs/1.0\'::ElementCS::ast\'");
}
final /*@Nullable*/ /*@Thrown*/ EObject ast_0 = _1.getAst();
- final /*@Nullable*/ /*@Thrown*/ example2.classes.Class oclAsType_0 = (example2.classes.Class)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast_0, TYP_classes_c_c_Class_0);
+ final /*@NonNull*/ /*@Thrown*/ example2.classes.Class oclAsType_0 = ClassUtil.nonNullState((example2.classes.Class)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast_0, TYP_classes_c_c_Class_0));
//
accumulator.add(oclAsType_0);
}
@@ -476,9 +474,9 @@ public class classescs2as_qvtp_qvtias extends CS2ASTransformationExecutor
// creations
// assignments
final /*@Nullable*/ /*@Thrown*/ EObject ast = packageCS_2.getAst();
- final /*@Nullable*/ /*@Thrown*/ Package oclAsType = (Package)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_classes_c_c_Package_0);
- final /*@Nullable*/ /*@Thrown*/ List<PackageCS> ownedPackages = packageCS_2.getOwnedPackages();
- assert ownedPackages != null;
+ final /*@NonNull*/ /*@Thrown*/ Package oclAsType = ClassUtil.nonNullState((Package)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_classes_c_c_Package_0));
+ @SuppressWarnings("null")
+ final /*@NonNull*/ /*@Thrown*/ List<PackageCS> ownedPackages = packageCS_2.getOwnedPackages();
final /*@NonNull*/ /*@Thrown*/ OrderedSetValue BOXED_ownedPackages = idResolver.createOrderedSetOfAll(ORD_CLSSid_PackageCS, ownedPackages);
/*@NonNull*/ /*@Thrown*/ SequenceValue.Accumulator accumulator = ValueUtil.createSequenceAccumulatorValue(SEQ_CLSSid_Package);
/*@Nullable*/ Iterator<?> ITERATOR__1 = BOXED_ownedPackages.iterator();
@@ -493,10 +491,10 @@ public class classescs2as_qvtp_qvtias extends CS2ASTransformationExecutor
* ast.oclAsType(classes::Package)
*/
if (_1 == null) {
- throwNull(packageCS_2, "Null source for \'classescs::ElementCS::ast\'");
+ throwNull(packageCS_2, "Null source for \'\'http://cs2as/tests/example2/classescs/1.0\'::ElementCS::ast\'");
}
final /*@Nullable*/ /*@Thrown*/ EObject ast_0 = _1.getAst();
- final /*@Nullable*/ /*@Thrown*/ Package oclAsType_0 = (Package)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast_0, TYP_classes_c_c_Package_0);
+ final /*@NonNull*/ /*@Thrown*/ Package oclAsType_0 = ClassUtil.nonNullState((Package)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast_0, TYP_classes_c_c_Package_0));
//
accumulator.add(oclAsType_0);
}
@@ -532,9 +530,9 @@ public class classescs2as_qvtp_qvtias extends CS2ASTransformationExecutor
// creations
// assignments
final /*@Nullable*/ /*@Thrown*/ EObject ast = rootCS_0.getAst();
- final /*@Nullable*/ /*@Thrown*/ Root oclAsType = (Root)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_classes_c_c_Root_0);
- final /*@Nullable*/ /*@Thrown*/ List<PackageCS> ownedPackages = rootCS_0.getOwnedPackages();
- assert ownedPackages != null;
+ final /*@NonNull*/ /*@Thrown*/ Root oclAsType = ClassUtil.nonNullState((Root)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast, TYP_classes_c_c_Root_0));
+ @SuppressWarnings("null")
+ final /*@NonNull*/ /*@Thrown*/ List<PackageCS> ownedPackages = rootCS_0.getOwnedPackages();
final /*@NonNull*/ /*@Thrown*/ OrderedSetValue BOXED_ownedPackages = idResolver.createOrderedSetOfAll(ORD_CLSSid_PackageCS, ownedPackages);
/*@NonNull*/ /*@Thrown*/ SequenceValue.Accumulator accumulator = ValueUtil.createSequenceAccumulatorValue(SEQ_CLSSid_Package);
/*@Nullable*/ Iterator<?> ITERATOR__1 = BOXED_ownedPackages.iterator();
@@ -550,10 +548,10 @@ public class classescs2as_qvtp_qvtias extends CS2ASTransformationExecutor
*/
final /*@NonNull*/ /*@NonInvalid*/ org.eclipse.ocl.pivot.Class TYP_classes_c_c_Package_0 = idResolver.getClass(CLSSid_Package, null);
if (_1 == null) {
- throwNull(rootCS_0, "Null source for \'classescs::ElementCS::ast\'");
+ throwNull(rootCS_0, "Null source for \'\'http://cs2as/tests/example2/classescs/1.0\'::ElementCS::ast\'");
}
final /*@Nullable*/ /*@Thrown*/ EObject ast_0 = _1.getAst();
- final /*@Nullable*/ /*@Thrown*/ Package oclAsType_0 = (Package)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast_0, TYP_classes_c_c_Package_0);
+ final /*@NonNull*/ /*@Thrown*/ Package oclAsType_0 = ClassUtil.nonNullState((Package)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, ast_0, TYP_classes_c_c_Package_0));
//
accumulator.add(oclAsType_0);
}
@@ -623,9 +621,9 @@ public class classescs2as_qvtp_qvtias extends CS2ASTransformationExecutor
final /*@NonNull*/ /*@NonInvalid*/ org.eclipse.ocl.pivot.Class TYP_classescs_c_c_ClassCS_2 = idResolver.getClass(CLSSid_ClassCS, null);
final /*@NonNull*/ /*@NonInvalid*/ org.eclipse.ocl.pivot.Class TYP_classescs_c_c_PackageCS_3 = idResolver.getClass(CLSSid_PackageCS, null);
final /*@NonNull*/ /*@NonInvalid*/ org.eclipse.ocl.pivot.Class TYP_classescs_c_c_RootCS_1 = idResolver.getClass(CLSSid_RootCS, null);
- final /*@NonNull*/ /*@Thrown*/ SetValue allInstances_6 = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_ClassCS, TYP_classescs_c_c_ClassCS_2);
- final /*@NonNull*/ /*@Thrown*/ SetValue allInstances_2 = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_PackageCS, TYP_classescs_c_c_PackageCS_3);
- final /*@NonNull*/ /*@Thrown*/ SetValue allInstances_1 = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_RootCS, TYP_classescs_c_c_RootCS_1);
+ final /*@NonNull*/ /*@NonInvalid*/ SetValue allInstances_6 = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_ClassCS, TYP_classescs_c_c_ClassCS_2);
+ final /*@NonNull*/ /*@NonInvalid*/ SetValue allInstances_2 = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_PackageCS, TYP_classescs_c_c_PackageCS_3);
+ final /*@NonNull*/ /*@NonInvalid*/ SetValue allInstances_1 = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_RootCS, TYP_classescs_c_c_RootCS_1);
final List<ClassCS> UNBOXED_allInstances_6 = allInstances_6.asEcoreObjects(idResolver, ClassCS.class);
assert UNBOXED_allInstances_6 != null;
final List<PackageCS> UNBOXED_allInstances_2 = allInstances_2.asEcoreObjects(idResolver, PackageCS.class);
diff --git a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src-gen/cg/ManualUML2RDBMS.java b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src-gen/cg/ManualUML2RDBMS.java
index b758b97b0..d4ca0e221 100644
--- a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src-gen/cg/ManualUML2RDBMS.java
+++ b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src-gen/cg/ManualUML2RDBMS.java
@@ -198,7 +198,7 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
// creations
// assignments
// mapping statements
- final @NonNull /*@Thrown*/ SetValue allInstances = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_Package, TYP_uml_c_c_Package_0);
+ final @NonNull /*@NonInvalid*/ SetValue allInstances = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_Package, TYP_uml_c_c_Package_0);
final List<Package> UNBOXED_allInstances = allInstances.asEcoreObjects(idResolver, Package.class);
assert UNBOXED_allInstances != null;
;
@@ -261,8 +261,8 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
*/
protected boolean packageToSchemaLM(final @NonNull /*@NonInvalid*/ Package p) {
// predicates
- final @Nullable /*@Thrown*/ List<PackageElement> elements_0 = p.getElements();
- assert elements_0 != null;
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ List<PackageElement> elements_0 = p.getElements();
// creations
final /*@Thrown*/ PackageToSchema p2s_11 = UML2RDBMSFactory.eINSTANCE.createPackageToSchema();
assert p2s_11 != null;
@@ -353,8 +353,8 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
p2s.setSchema(s_2);
// mapping statements
packageToSchemaMR_1(p2s, s_2);
- final @Nullable /*@Thrown*/ List<PrimitiveToName> primitivesToNames = p2s.getPrimitivesToNames();
- assert primitivesToNames != null;
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ List<PrimitiveToName> primitivesToNames = p2s.getPrimitivesToNames();
;
for (PrimitiveToName child : primitivesToNames) {
if (child != null) {
@@ -364,8 +364,8 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
stringToVarcharMR(symbol_5, p2s);
}
}
- final @Nullable /*@Thrown*/ List<ClassToTable> classesToTables = p2s.getClassesToTables();
- assert classesToTables != null;
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ List<ClassToTable> classesToTables = p2s.getClassesToTables();
;
for (ClassToTable child_0 : classesToTables) {
if (child_0 != null) {
@@ -424,8 +424,9 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
*/
protected boolean integerToNumberLM(final @NonNull /*@NonInvalid*/ Package p_0, final @NonNull /*@NonInvalid*/ PackageToSchema p2s_0, final @NonNull /*@NonInvalid*/ PrimitiveDataType prim) {
// predicates
- final @Nullable /*@Thrown*/ Package umlPackage = p2s_0.getUmlPackage();
- final /*@Thrown*/ boolean eq = p_0.equals(umlPackage);
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ Package umlPackage = p2s_0.getUmlPackage();
+ final /*@Thrown*/ boolean eq = umlPackage.equals(p_0);
if (!eq) {
return false;
}
@@ -472,8 +473,8 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
protected boolean integerToNumberMR(final @NonNull /*@NonInvalid*/ PrimitiveToName p2n, final @NonNull /*@NonInvalid*/ PackageToSchema p2s_2) {
// predicates
final @Nullable /*@Thrown*/ String name = p2n.getName();
- final @NonNull /*@Thrown*/ String sum = StringConcatOperation.INSTANCE.evaluate(STR_Integer, STR_2);
- final @NonNull /*@Thrown*/ String sum_0 = StringConcatOperation.INSTANCE.evaluate(sum, STR_NUMBER);
+ final @NonNull /*@NonInvalid*/ String sum = StringConcatOperation.INSTANCE.evaluate(STR_Integer, STR_2);
+ final @NonNull /*@NonInvalid*/ String sum_0 = StringConcatOperation.INSTANCE.evaluate(sum, STR_NUMBER);
final /*@Thrown*/ boolean eq = sum_0.equals(name);
if (!eq) {
return false;
@@ -512,8 +513,9 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
*/
protected boolean booleanToBooleanLM(final @NonNull /*@NonInvalid*/ Package p_1, final @NonNull /*@NonInvalid*/ PackageToSchema p2s_3, final @NonNull /*@NonInvalid*/ PrimitiveDataType prim_0) {
// predicates
- final @Nullable /*@Thrown*/ Package umlPackage = p2s_3.getUmlPackage();
- final /*@Thrown*/ boolean eq = p_1.equals(umlPackage);
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ Package umlPackage = p2s_3.getUmlPackage();
+ final /*@Thrown*/ boolean eq = umlPackage.equals(p_1);
if (!eq) {
return false;
}
@@ -560,8 +562,8 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
protected boolean booleanToBooleanMR(final @NonNull /*@NonInvalid*/ PrimitiveToName p2n_0, final @NonNull /*@NonInvalid*/ PackageToSchema p2s_4) {
// predicates
final @Nullable /*@Thrown*/ String name = p2n_0.getName();
- final @NonNull /*@Thrown*/ String sum = StringConcatOperation.INSTANCE.evaluate(STR_Boolean, STR_2);
- final @NonNull /*@Thrown*/ String sum_0 = StringConcatOperation.INSTANCE.evaluate(sum, STR_BOOLEAN);
+ final @NonNull /*@NonInvalid*/ String sum = StringConcatOperation.INSTANCE.evaluate(STR_Boolean, STR_2);
+ final @NonNull /*@NonInvalid*/ String sum_0 = StringConcatOperation.INSTANCE.evaluate(sum, STR_BOOLEAN);
final /*@Thrown*/ boolean eq = sum_0.equals(name);
if (!eq) {
return false;
@@ -600,8 +602,9 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
*/
protected boolean stringToVarcharLM(final @NonNull /*@NonInvalid*/ Package p_2, final @NonNull /*@NonInvalid*/ PackageToSchema p2s_5, final @NonNull /*@NonInvalid*/ PrimitiveDataType prim_1) {
// predicates
- final @Nullable /*@Thrown*/ Package umlPackage = p2s_5.getUmlPackage();
- final /*@Thrown*/ boolean eq = p_2.equals(umlPackage);
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ Package umlPackage = p2s_5.getUmlPackage();
+ final /*@Thrown*/ boolean eq = umlPackage.equals(p_2);
if (!eq) {
return false;
}
@@ -648,8 +651,8 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
protected boolean stringToVarcharMR(final @NonNull /*@NonInvalid*/ PrimitiveToName p2n_1, final @NonNull /*@NonInvalid*/ PackageToSchema p2s_6) {
// predicates
final @Nullable /*@Thrown*/ String name = p2n_1.getName();
- final @NonNull /*@Thrown*/ String sum = StringConcatOperation.INSTANCE.evaluate(STR_String, STR_2);
- final @NonNull /*@Thrown*/ String sum_0 = StringConcatOperation.INSTANCE.evaluate(sum, STR_VARCHAR);
+ final @NonNull /*@NonInvalid*/ String sum = StringConcatOperation.INSTANCE.evaluate(STR_String, STR_2);
+ final @NonNull /*@NonInvalid*/ String sum_0 = StringConcatOperation.INSTANCE.evaluate(sum, STR_VARCHAR);
final /*@Thrown*/ boolean eq = sum_0.equals(name);
if (!eq) {
return false;
@@ -717,8 +720,9 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
if (!eq_0) {
return false;
}
- final @Nullable /*@Thrown*/ Package umlPackage = p2s_7.getUmlPackage();
- final /*@Thrown*/ boolean eq_1 = p_3.equals(umlPackage);
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ Package umlPackage = p2s_7.getUmlPackage();
+ final /*@Thrown*/ boolean eq_1 = umlPackage.equals(p_3);
if (!eq_1) {
return false;
}
@@ -733,16 +737,14 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
final @Nullable /*@Thrown*/ String name = c.getName();
c2t_3.setName(name);
// mapping statements
- final @Nullable /*@Thrown*/ List<Attribute> attributes = c.getAttributes();
- assert attributes != null;
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ List<Attribute> attributes = c.getAttributes();
;
for (Attribute anAttribute : attributes) {
if (anAttribute != null) {
final @NonNull /*@NonInvalid*/ Attribute symbol_6 = (Attribute)anAttribute;
- final @Nullable /*@Thrown*/ Classifier type_0 = symbol_6.getType();
- if (type_0 == null) {
- throw new InvalidValueException("Null binding for \'complexAttributeComplexAttributesLM::c\'");
- }
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ Classifier type_0 = symbol_6.getType();
classPrimitiveAttributesLM(symbol_6, c, c2t_3);
classComplexAttributesLM(symbol_6, c, c2t_3);
if (type_0 instanceof manualuml2rdbms.uml.Class) {
@@ -805,15 +807,15 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
*/
protected boolean classToTableMR(final @NonNull /*@NonInvalid*/ ClassToTable c2t, final @NonNull /*@NonInvalid*/ PackageToSchema p2s_8, final @NonNull /*@NonInvalid*/ Schema s) {
// predicates
+ final @NonNull /*@NonInvalid*/ IdResolver idResolver = evaluator.getIdResolver();
final @Nullable /*@Thrown*/ PackageToSchema owner = c2t.getOwner();
final /*@Thrown*/ boolean eq = p2s_8.equals(owner);
if (!eq) {
return false;
}
- final @NonNull /*@NonInvalid*/ IdResolver idResolver = evaluator.getIdResolver();
final @NonNull /*@NonInvalid*/ org.eclipse.ocl.pivot.Class TYP_uml2rdbms_c_c_NonLeafAttribute_0 = idResolver.getClass(CLSSid_NonLeafAttribute, null);
- final @Nullable /*@Thrown*/ List<FromAttribute> fromAttributes = c2t.getFromAttributes();
- assert fromAttributes != null;
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ List<FromAttribute> fromAttributes = c2t.getFromAttributes();
final @NonNull /*@Thrown*/ SetValue BOXED_fromAttributes = idResolver.createSetOfAll(SET_CLSSid_FromAttribute, fromAttributes);
// creations
final /*@Thrown*/ Table t_0 = RDBMSFactory.eINSTANCE.createTable();
@@ -825,8 +827,8 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
// mapping statements
classToTableMR_1(c2t, t_0);
classToTableMR_2(c2t, t_0);
- final @Nullable /*@Thrown*/ List<AssociationToForeignKey> associationsToForeignKeys = c2t.getAssociationsToForeignKeys();
- assert associationsToForeignKeys != null;
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ List<AssociationToForeignKey> associationsToForeignKeys = c2t.getAssociationsToForeignKeys();
;
for (AssociationToForeignKey child : associationsToForeignKeys) {
if (child != null) {
@@ -844,22 +846,19 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
}
final @NonNull /*@Thrown*/ SetValue selectByKind = (SetValue)CollectionSelectByKindOperation.INSTANCE.evaluate(evaluator, BOXED_fromAttributes, TYP_uml2rdbms_c_c_NonLeafAttribute_0);
@NonNull /*@Thrown*/ BagValue.Accumulator accumulator = ValueUtil.createBagAccumulatorValue(BAG_CLSSid_FromAttribute);
- @Nullable Iterator<?> ITERATOR__1 = selectByKind.iterator();
+ @NonNull Iterator<?> ITERATOR__1 = selectByKind.iterator();
@NonNull /*@Thrown*/ BagValue collect;
while (true) {
if (!ITERATOR__1.hasNext()) {
collect = accumulator;
break;
}
- @Nullable /*@NonInvalid*/ NonLeafAttribute _1 = (NonLeafAttribute)ITERATOR__1.next();
+ @NonNull /*@NonInvalid*/ NonLeafAttribute _1 = (NonLeafAttribute)ITERATOR__1.next();
/**
* fromAttributes
*/
- if (_1 == null) {
- throw new InvalidValueException("Null source for \'uml2rdbms::FromAttributeOwner::fromAttributes\'");
- }
- final @Nullable /*@Thrown*/ List<FromAttribute> fromAttributes_1 = _1.getFromAttributes();
- assert fromAttributes_1 != null;
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ List<FromAttribute> fromAttributes_1 = _1.getFromAttributes();
final @NonNull /*@Thrown*/ SetValue BOXED_fromAttributes_1 = idResolver.createSetOfAll(SET_CLSSid_FromAttribute, fromAttributes_1);
//
for (Object value : BOXED_fromAttributes_1.flatten().getElements()) {
@@ -1067,22 +1066,25 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
*/
protected boolean associationToForeignKeyLM(final @NonNull /*@NonInvalid*/ Association a, final @NonNull /*@NonInvalid*/ Package p_4, final @NonNull /*@NonInvalid*/ PackageToSchema p2s_9) {
// predicates
- final @Nullable /*@Thrown*/ manualuml2rdbms.uml.Class destination = a.getDestination();
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ manualuml2rdbms.uml.Class destination = a.getDestination();
final @Nullable /*@Thrown*/ manualuml2rdbms.uml.Class dc = destination;
final @Nullable /*@Thrown*/ Package namespace = a.getNamespace();
final /*@Thrown*/ boolean eq = p_4.equals(namespace);
if (!eq) {
return false;
}
- final @Nullable /*@Thrown*/ Package umlPackage = p2s_9.getUmlPackage();
- final /*@Thrown*/ boolean eq_0 = p_4.equals(umlPackage);
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ Package umlPackage = p2s_9.getUmlPackage();
+ final /*@Thrown*/ boolean eq_0 = umlPackage.equals(p_4);
if (!eq_0) {
return false;
}
- final @Nullable /*@Thrown*/ manualuml2rdbms.uml.Class source = a.getSource();
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ manualuml2rdbms.uml.Class source = a.getSource();
final @Nullable /*@Thrown*/ manualuml2rdbms.uml.Class sc = source;
if (dc == null) {
- throw new InvalidValueException("Null source for \'uml2rdbms::ClassToTable::umlClass\'");
+ throw new InvalidValueException("Null source for \'\'http://www.eclipse.org/qvt/examples/0.1/ManualUML2RDBMS\'::ClassToTable::umlClass\'");
}
if (dc instanceof InvalidValueException) {
throw (InvalidValueException)dc;
@@ -1090,7 +1092,7 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
final @Nullable /*@Thrown*/ ClassToTable ClassToTable = ClassUtil.nonNullState (OPPOSITE_OF_ClassToTable_umlClass.get(dc));
final @Nullable /*@Thrown*/ ClassToTable dc2t_0 = ClassToTable;
if (sc == null) {
- throw new InvalidValueException("Null source for \'uml2rdbms::ClassToTable::umlClass\'");
+ throw new InvalidValueException("Null source for \'\'http://www.eclipse.org/qvt/examples/0.1/ManualUML2RDBMS\'::ClassToTable::umlClass\'");
}
if (sc instanceof InvalidValueException) {
throw (InvalidValueException)sc;
@@ -1117,7 +1119,7 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
if (dc instanceof InvalidValueException) {
throw (InvalidValueException)dc;
}
- final /*@Thrown*/ boolean eq_2 = (destination != null) ? destination.equals(dc) : (dc == null);
+ final /*@Thrown*/ boolean eq_2 = destination.equals(dc);
CAUGHT_eq_2 = eq_2;
}
catch (Exception e) {
@@ -1128,7 +1130,7 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
if (sc instanceof InvalidValueException) {
throw (InvalidValueException)sc;
}
- final /*@Thrown*/ boolean eq_3 = (source != null) ? source.equals(sc) : (sc == null);
+ final /*@Thrown*/ boolean eq_3 = source.equals(sc);
CAUGHT_eq_3 = eq_3;
}
catch (Exception e) {
@@ -1148,7 +1150,7 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
if (dc instanceof InvalidValueException) {
throw (InvalidValueException)dc;
}
- final /*@Thrown*/ boolean ne = (destination != null) ? !destination.equals(dc) : (dc != null);
+ final /*@Thrown*/ boolean ne = !destination.equals(dc);
CAUGHT_ne = ne;
}
catch (Exception e) {
@@ -1161,7 +1163,7 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
@NonNull /*@Thrown*/ String symbol_5;
if (and_0) {
if (dc == null) {
- throw new InvalidValueException("Null source for \'uml::UMLModelElement::name\'");
+ throw new InvalidValueException("Null source for \'\'http://www.eclipse.org/qvt/examples/0.1/ManualUML\'::UMLModelElement::name\'");
}
if (dc instanceof InvalidValueException) {
throw (InvalidValueException)dc;
@@ -1178,7 +1180,7 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
if (sc instanceof InvalidValueException) {
throw (InvalidValueException)sc;
}
- final /*@Thrown*/ boolean ne_0 = (source != null) ? !source.equals(sc) : (sc != null);
+ final /*@Thrown*/ boolean ne_0 = !source.equals(sc);
CAUGHT_ne_0 = ne_0;
}
catch (Exception e) {
@@ -1196,7 +1198,7 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
}
else {
if (dc == null) {
- throw new InvalidValueException("Null source for \'uml::UMLModelElement::name\'");
+ throw new InvalidValueException("Null source for \'\'http://www.eclipse.org/qvt/examples/0.1/ManualUML\'::UMLModelElement::name\'");
}
if (dc instanceof InvalidValueException) {
throw (InvalidValueException)dc;
@@ -1268,13 +1270,15 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
if (!eq_0) {
return false;
}
- final @Nullable /*@Thrown*/ Schema schema = p2s_10.getSchema();
- final /*@Thrown*/ boolean eq_1 = s_0.equals(schema);
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ Schema schema = p2s_10.getSchema();
+ final /*@Thrown*/ boolean eq_1 = schema.equals(s_0);
if (!eq_1) {
return false;
}
- final @Nullable /*@Thrown*/ Schema schema_0 = st.getSchema();
- final /*@Thrown*/ boolean eq_2 = s_0.equals(schema_0);
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ Schema schema_0 = st.getSchema();
+ final /*@Thrown*/ boolean eq_2 = schema_0.equals(s_0);
if (!eq_2) {
return false;
}
@@ -1295,7 +1299,7 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
fc_0.setOwner(st);
// mapping statements
if (referenced == null) {
- throw new InvalidValueException("Null source for \'uml2rdbms::ClassToTable::table\'");
+ throw new InvalidValueException("Null source for \'\'http://www.eclipse.org/qvt/examples/0.1/ManualUML2RDBMS\'::ClassToTable::table\'");
}
final @Nullable /*@Thrown*/ Table table = referenced.getTable();
if (table == null) {
@@ -1338,12 +1342,12 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
final List<ForeignKey> UNBOXED_OrderedSet = OrderedSet.asEcoreObjects(idResolver, ForeignKey.class);
assert UNBOXED_OrderedSet != null;
fc.getForeignKeys().addAll(UNBOXED_OrderedSet);
- final @Nullable /*@Thrown*/ List<Column> column = rk_0.getColumn();
- assert column != null;
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ List<Column> column = rk_0.getColumn();
final @NonNull /*@Thrown*/ OrderedSetValue BOXED_column = idResolver.createOrderedSetOfAll(ORD_CLSSid_Column, column);
final @Nullable /*@Thrown*/ Column first = (Column)OrderedCollectionFirstOperation.INSTANCE.evaluate(BOXED_column);
if (first == null) {
- throw new InvalidValueException("Null source for \'rdbms::Column::type\'");
+ throw new InvalidValueException("Null source for \'\'http://www.eclipse.org/qvt/examples/0.1/ManualRDBMS\'::Column::type\'");
}
final @Nullable /*@Thrown*/ String type = first.getType();
fc.setType(type);
@@ -1407,8 +1411,10 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
*/
protected boolean classPrimitiveAttributesLM(final @NonNull /*@NonInvalid*/ Attribute a_0, final @NonNull /*@NonInvalid*/ manualuml2rdbms.uml.Class c_0, final @NonNull /*@NonInvalid*/ ClassToTable fao) {
// predicates
- final @Nullable /*@Thrown*/ manualuml2rdbms.uml.Class owner = a_0.getOwner();
- final /*@Thrown*/ boolean eq = c_0.equals(owner);
+ final @NonNull /*@NonInvalid*/ IdResolver idResolver = evaluator.getIdResolver();
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ manualuml2rdbms.uml.Class owner = a_0.getOwner();
+ final /*@Thrown*/ boolean eq = owner.equals(c_0);
if (!eq) {
return false;
}
@@ -1417,17 +1423,17 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
if (!eq_0) {
return false;
}
- final @Nullable /*@Thrown*/ Classifier type = a_0.getType();
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ Classifier type = a_0.getType();
if (!(type instanceof PrimitiveDataType)) {
return false;
}
final @Nullable /*@Thrown*/ PrimitiveDataType t_0 = (PrimitiveDataType)type;
if (t_0 == null) {
- throw new InvalidValueException("Null source for \'uml2rdbms::PrimitiveToName::primitive\'");
+ throw new InvalidValueException("Null source for \'\'http://www.eclipse.org/qvt/examples/0.1/ManualUML2RDBMS\'::PrimitiveToName::primitive\'");
}
final @NonNull /*@Thrown*/ PrimitiveToName PrimitiveToName = ClassUtil.nonNullState (OPPOSITE_OF_PrimitiveToName_primitive.get(t_0));
final @Nullable /*@Thrown*/ PrimitiveToName p2n_3 = PrimitiveToName;
- final @NonNull /*@NonInvalid*/ IdResolver idResolver = evaluator.getIdResolver();
// creations
final /*@Thrown*/ AttributeToColumn atc = UML2RDBMSFactory.eINSTANCE.createAttributeToColumn();
assert atc != null;
@@ -1475,8 +1481,10 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
*/
protected boolean classComplexAttributesLM(final @NonNull /*@NonInvalid*/ Attribute a_1, final @NonNull /*@NonInvalid*/ manualuml2rdbms.uml.Class c_1, final @NonNull /*@NonInvalid*/ ClassToTable fao_0) {
// predicates
- final @Nullable /*@Thrown*/ manualuml2rdbms.uml.Class owner = a_1.getOwner();
- final /*@Thrown*/ boolean eq = c_1.equals(owner);
+ final @NonNull /*@NonInvalid*/ IdResolver idResolver = evaluator.getIdResolver();
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ manualuml2rdbms.uml.Class owner = a_1.getOwner();
+ final /*@Thrown*/ boolean eq = owner.equals(c_1);
if (!eq) {
return false;
}
@@ -1485,12 +1493,12 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
if (!eq_0) {
return false;
}
- final @Nullable /*@Thrown*/ Classifier type = a_1.getType();
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ Classifier type = a_1.getType();
if (!(type instanceof manualuml2rdbms.uml.Class)) {
return false;
}
final @Nullable /*@Thrown*/ manualuml2rdbms.uml.Class t_0 = (manualuml2rdbms.uml.Class)type;
- final @NonNull /*@NonInvalid*/ IdResolver idResolver = evaluator.getIdResolver();
// creations
final /*@Thrown*/ NonLeafAttribute fa = UML2RDBMSFactory.eINSTANCE.createNonLeafAttribute();
assert fa != null;
@@ -1503,8 +1511,8 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
fa.setKind(kind);
final @Nullable /*@Thrown*/ String name = a_1.getName();
fa.setName(name);
- final @Nullable /*@Thrown*/ List<FromAttribute> fromAttributes = fao_0.getFromAttributes();
- assert fromAttributes != null;
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ List<FromAttribute> fromAttributes = fao_0.getFromAttributes();
final @NonNull /*@Thrown*/ SetValue BOXED_fromAttributes = idResolver.createSetOfAll(SET_CLSSid_FromAttribute, fromAttributes);
@NonNull /*@Thrown*/ BagValue.Accumulator accumulator = ValueUtil.createBagAccumulatorValue(BAG_CLSSid_AttributeToColumn);
@Nullable Iterator<?> ITERATOR__1 = BOXED_fromAttributes.iterator();
@@ -1519,10 +1527,10 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
* leafs
*/
if (_1 == null) {
- throw new InvalidValueException("Null source for \'uml2rdbms::FromAttribute::leafs\'");
+ throw new InvalidValueException("Null source for \'\'http://www.eclipse.org/qvt/examples/0.1/ManualUML2RDBMS\'::FromAttribute::leafs\'");
}
- final @Nullable /*@Thrown*/ List<AttributeToColumn> leafs = _1.getLeafs();
- assert leafs != null;
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ List<AttributeToColumn> leafs = _1.getLeafs();
final @NonNull /*@Thrown*/ SetValue BOXED_leafs = idResolver.createSetOfAll(SET_CLSSid_AttributeToColumn, leafs);
//
for (Object value : BOXED_leafs.flatten().getElements()) {
@@ -1567,16 +1575,17 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
return false;
}
final @Nullable /*@Thrown*/ NonLeafAttribute fao_2 = (NonLeafAttribute)FromAttribute;
- final @Nullable /*@Thrown*/ Classifier type = ca.getType();
- final /*@Thrown*/ boolean eq = c_2.equals(type);
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ Classifier type = ca.getType();
+ final /*@Thrown*/ boolean eq = type.equals(c_2);
if (!eq) {
return false;
}
// creations
// assignments
// mapping statements
- final @Nullable /*@Thrown*/ List<Attribute> attributes = c_2.getAttributes();
- assert attributes != null;
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ List<Attribute> attributes = c_2.getAttributes();
;
for (Attribute anAttribute : attributes) {
if (anAttribute != null) {
@@ -1620,17 +1629,18 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
*/
protected boolean complexAttributePrimitiveAttributesLM_1(final @NonNull /*@NonInvalid*/ Attribute a_1_0, final @NonNull /*@NonInvalid*/ manualuml2rdbms.uml.Class c_1_0, final @NonNull /*@NonInvalid*/ Attribute ca_1, final @NonNull /*@NonInvalid*/ NonLeafAttribute fao_1) {
// predicates
- final @Nullable /*@Thrown*/ Classifier type = a_1_0.getType();
+ final @NonNull /*@NonInvalid*/ IdResolver idResolver = evaluator.getIdResolver();
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ Classifier type = a_1_0.getType();
if (!(type instanceof PrimitiveDataType)) {
return false;
}
final @Nullable /*@Thrown*/ PrimitiveDataType t_1_0 = (PrimitiveDataType)type;
if (t_1_0 == null) {
- throw new InvalidValueException("Null source for \'uml2rdbms::PrimitiveToName::primitive\'");
+ throw new InvalidValueException("Null source for \'\'http://www.eclipse.org/qvt/examples/0.1/ManualUML2RDBMS\'::PrimitiveToName::primitive\'");
}
final @NonNull /*@Thrown*/ PrimitiveToName PrimitiveToName = ClassUtil.nonNullState (OPPOSITE_OF_PrimitiveToName_primitive.get(t_1_0));
final @Nullable /*@Thrown*/ PrimitiveToName p2n_1_0 = PrimitiveToName;
- final @NonNull /*@NonInvalid*/ IdResolver idResolver = evaluator.getIdResolver();
// creations
final /*@Thrown*/ AttributeToColumn fa = UML2RDBMSFactory.eINSTANCE.createAttributeToColumn();
assert fa != null;
@@ -1685,16 +1695,17 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
return false;
}
final @Nullable /*@Thrown*/ NonLeafAttribute fao_2 = (NonLeafAttribute)FromAttribute;
- final @Nullable /*@Thrown*/ Classifier type = ca_0.getType();
- final /*@Thrown*/ boolean eq = c_3.equals(type);
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ Classifier type = ca_0.getType();
+ final /*@Thrown*/ boolean eq = type.equals(c_3);
if (!eq) {
return false;
}
// creations
// assignments
// mapping statements
- final @Nullable /*@Thrown*/ List<Attribute> attributes = c_3.getAttributes();
- assert attributes != null;
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ List<Attribute> attributes = c_3.getAttributes();
;
for (Attribute anAttribute : attributes) {
if (anAttribute != null) {
@@ -1735,25 +1746,27 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
*/
protected boolean complexAttributeComplexAttributesLM_1(final @NonNull /*@NonInvalid*/ Attribute a_1_1, final @NonNull /*@NonInvalid*/ manualuml2rdbms.uml.Class c_1_1, final @NonNull /*@NonInvalid*/ Attribute ca_1_0, final @NonNull /*@NonInvalid*/ NonLeafAttribute fao_1_0) {
// predicates
- final @Nullable /*@Thrown*/ manualuml2rdbms.uml.Class owner = a_1_1.getOwner();
- final /*@Thrown*/ boolean eq = c_1_1.equals(owner);
+ final @NonNull /*@NonInvalid*/ IdResolver idResolver = evaluator.getIdResolver();
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ manualuml2rdbms.uml.Class owner = a_1_1.getOwner();
+ final /*@Thrown*/ boolean eq = owner.equals(c_1_1);
if (!eq) {
return false;
}
- final @Nullable /*@Thrown*/ Classifier type = a_1_1.getType();
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ Classifier type = a_1_1.getType();
if (!(type instanceof manualuml2rdbms.uml.Class)) {
return false;
}
final @Nullable /*@Thrown*/ manualuml2rdbms.uml.Class t_1_0 = (manualuml2rdbms.uml.Class)type;
- final @NonNull /*@NonInvalid*/ IdResolver idResolver = evaluator.getIdResolver();
// creations
final /*@Thrown*/ NonLeafAttribute fa = UML2RDBMSFactory.eINSTANCE.createNonLeafAttribute();
assert fa != null;
models[2/*middle*/].add(fa);
// assignments
fa.setOwner(fao_1_0);
- final @Nullable /*@Thrown*/ List<FromAttribute> fromAttributes = fao_1_0.getFromAttributes();
- assert fromAttributes != null;
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ List<FromAttribute> fromAttributes = fao_1_0.getFromAttributes();
final @NonNull /*@Thrown*/ SetValue BOXED_fromAttributes = idResolver.createSetOfAll(SET_CLSSid_FromAttribute, fromAttributes);
@NonNull /*@Thrown*/ BagValue.Accumulator accumulator = ValueUtil.createBagAccumulatorValue(BAG_CLSSid_AttributeToColumn);
@Nullable Iterator<?> ITERATOR__1 = BOXED_fromAttributes.iterator();
@@ -1768,10 +1781,10 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
* leafs
*/
if (_1 == null) {
- throw new InvalidValueException("Null source for \'uml2rdbms::FromAttribute::leafs\'");
+ throw new InvalidValueException("Null source for \'\'http://www.eclipse.org/qvt/examples/0.1/ManualUML2RDBMS\'::FromAttribute::leafs\'");
}
- final @Nullable /*@Thrown*/ List<AttributeToColumn> leafs = _1.getLeafs();
- assert leafs != null;
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ List<AttributeToColumn> leafs = _1.getLeafs();
final @NonNull /*@Thrown*/ SetValue BOXED_leafs = idResolver.createSetOfAll(SET_CLSSid_AttributeToColumn, leafs);
//
for (Object value : BOXED_leafs.flatten().getElements()) {
@@ -1839,9 +1852,10 @@ public class ManualUML2RDBMS extends AbstractTransformationExecutor
final @Nullable /*@Thrown*/ PrimitiveToName type = a2c.getType();
final @Nullable /*@Thrown*/ PrimitiveToName p2n_3 = type;
if (p2n_3 == null) {
- throw new InvalidValueException("Null source for \'uml2rdbms::PrimitiveToName::typeName\'");
+ throw new InvalidValueException("Null source for \'\'http://www.eclipse.org/qvt/examples/0.1/ManualUML2RDBMS\'::PrimitiveToName::typeName\'");
}
- final @Nullable /*@Thrown*/ String typeName = p2n_3.getTypeName();
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ String typeName = p2n_3.getTypeName();
final @Nullable /*@Thrown*/ String ct = typeName;
// creations
final /*@Thrown*/ Column c_4 = RDBMSFactory.eINSTANCE.createColumn();
diff --git a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src-gen/cg/classescs2as.java b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src-gen/cg/classescs2as.java
index 2c542cbf9..9f569a4f5 100644
--- a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src-gen/cg/classescs2as.java
+++ b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src-gen/cg/classescs2as.java
@@ -324,8 +324,9 @@ public class classescs2as extends AbstractTransformationExecutor
protected boolean uClass_name(final @NonNull /*@NonInvalid*/ classes.Class symbol_0, final @NonNull /*@NonInvalid*/ ClassCS classCS_0) {
// predicates
final @NonNull /*@Thrown*/ ClassCS2Class ClassCS2Class = ClassUtil.nonNullState (OPPOSITE_OF_ClassCS2Class_classCS.get(classCS_0));
- final @Nullable /*@Thrown*/ classes.Class symbol_3 = ClassCS2Class.getClass_();
- final /*@Thrown*/ boolean eq = symbol_0.equals(symbol_3);
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ classes.Class symbol_3 = ClassCS2Class.getClass_();
+ final /*@Thrown*/ boolean eq = symbol_3.equals(symbol_0);
if (!eq) {
return false;
}
@@ -356,17 +357,18 @@ public class classescs2as extends AbstractTransformationExecutor
*/
protected boolean uRoot_ownedPackages(final @NonNull /*@NonInvalid*/ Root root, final @NonNull /*@NonInvalid*/ RootCS rootCS_0) {
// predicates
+ final @NonNull /*@NonInvalid*/ IdResolver idResolver = evaluator.getIdResolver();
final @NonNull /*@Thrown*/ RootCS2Root RootCS2Root = ClassUtil.nonNullState (OPPOSITE_OF_RootCS2Root_rootCS.get(rootCS_0));
- final @Nullable /*@Thrown*/ Root root_0 = RootCS2Root.getRoot();
- final /*@Thrown*/ boolean eq = root.equals(root_0);
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ Root root_0 = RootCS2Root.getRoot();
+ final /*@Thrown*/ boolean eq = root_0.equals(root);
if (!eq) {
return false;
}
- final @NonNull /*@NonInvalid*/ IdResolver idResolver = evaluator.getIdResolver();
// creations
// assignments
- final @Nullable /*@Thrown*/ List<PackageCS> ownedPackages = rootCS_0.getOwnedPackages();
- assert ownedPackages != null;
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ List<PackageCS> ownedPackages = rootCS_0.getOwnedPackages();
final @NonNull /*@Thrown*/ OrderedSetValue BOXED_ownedPackages = idResolver.createOrderedSetOfAll(ORD_CLSSid_PackageCS, ownedPackages);
@NonNull /*@Thrown*/ SequenceValue.Accumulator accumulator = ValueUtil.createSequenceAccumulatorValue(SEQ_CLSSid_PackageCS2Package);
@Nullable Iterator<?> ITERATOR__1 = BOXED_ownedPackages.iterator();
@@ -381,28 +383,26 @@ public class classescs2as extends AbstractTransformationExecutor
* PackageCS2Package
*/
if (_1 == null) {
- throw new InvalidValueException("Null source for \'classescstraces::PackageCS2Package::packageCS\'");
+ throw new InvalidValueException("Null source for \'\'http://tracesmodel/1.0/classescstraces\'::PackageCS2Package::packageCS\'");
}
final @NonNull /*@Thrown*/ PackageCS2Package PackageCS2Package = ClassUtil.nonNullState (OPPOSITE_OF_PackageCS2Package_packageCS.get(_1));
//
accumulator.add(PackageCS2Package);
}
@NonNull /*@Thrown*/ SequenceValue.Accumulator accumulator_0 = ValueUtil.createSequenceAccumulatorValue(SEQ_CLSSid_Package);
- @Nullable Iterator<?> ITERATOR__1_0 = collect_0.iterator();
+ @NonNull Iterator<?> ITERATOR__1_0 = collect_0.iterator();
@NonNull /*@Thrown*/ SequenceValue collect;
while (true) {
if (!ITERATOR__1_0.hasNext()) {
collect = accumulator_0;
break;
}
- @Nullable /*@NonInvalid*/ PackageCS2Package _1_0 = (PackageCS2Package)ITERATOR__1_0.next();
+ @NonNull /*@NonInvalid*/ PackageCS2Package _1_0 = (PackageCS2Package)ITERATOR__1_0.next();
/**
* package
*/
- if (_1_0 == null) {
- throw new InvalidValueException("Null source for \'classescstraces::PackageCS2Package::package\'");
- }
- final @Nullable /*@Thrown*/ Package symbol_3 = _1_0.getPackage();
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ Package symbol_3 = _1_0.getPackage();
//
accumulator_0.add(symbol_3);
}
@@ -433,8 +433,9 @@ public class classescs2as extends AbstractTransformationExecutor
protected boolean uPackage_name(final @NonNull /*@NonInvalid*/ Package symbol_1, final @NonNull /*@NonInvalid*/ PackageCS packageCS_0) {
// predicates
final @NonNull /*@Thrown*/ PackageCS2Package PackageCS2Package = ClassUtil.nonNullState (OPPOSITE_OF_PackageCS2Package_packageCS.get(packageCS_0));
- final @Nullable /*@Thrown*/ Package symbol_3 = PackageCS2Package.getPackage();
- final /*@Thrown*/ boolean eq = symbol_1.equals(symbol_3);
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ Package symbol_3 = PackageCS2Package.getPackage();
+ final /*@Thrown*/ boolean eq = symbol_3.equals(symbol_1);
if (!eq) {
return false;
}
@@ -465,17 +466,18 @@ public class classescs2as extends AbstractTransformationExecutor
*/
protected boolean uPackage_ownedClasses(final @NonNull /*@NonInvalid*/ Package symbol_2, final @NonNull /*@NonInvalid*/ PackageCS packageCS_1) {
// predicates
+ final @NonNull /*@NonInvalid*/ IdResolver idResolver = evaluator.getIdResolver();
final @NonNull /*@Thrown*/ PackageCS2Package PackageCS2Package = ClassUtil.nonNullState (OPPOSITE_OF_PackageCS2Package_packageCS.get(packageCS_1));
- final @Nullable /*@Thrown*/ Package symbol_3 = PackageCS2Package.getPackage();
- final /*@Thrown*/ boolean eq = symbol_2.equals(symbol_3);
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ Package symbol_3 = PackageCS2Package.getPackage();
+ final /*@Thrown*/ boolean eq = symbol_3.equals(symbol_2);
if (!eq) {
return false;
}
- final @NonNull /*@NonInvalid*/ IdResolver idResolver = evaluator.getIdResolver();
// creations
// assignments
- final @Nullable /*@Thrown*/ List<ClassCS> ownedClasses = packageCS_1.getOwnedClasses();
- assert ownedClasses != null;
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ List<ClassCS> ownedClasses = packageCS_1.getOwnedClasses();
final @NonNull /*@Thrown*/ OrderedSetValue BOXED_ownedClasses = idResolver.createOrderedSetOfAll(ORD_CLSSid_ClassCS, ownedClasses);
@NonNull /*@Thrown*/ SequenceValue.Accumulator accumulator = ValueUtil.createSequenceAccumulatorValue(SEQ_CLSSid_ClassCS2Class);
@Nullable Iterator<?> ITERATOR__1 = BOXED_ownedClasses.iterator();
@@ -490,28 +492,26 @@ public class classescs2as extends AbstractTransformationExecutor
* ClassCS2Class
*/
if (_1 == null) {
- throw new InvalidValueException("Null source for \'classescstraces::ClassCS2Class::classCS\'");
+ throw new InvalidValueException("Null source for \'\'http://tracesmodel/1.0/classescstraces\'::ClassCS2Class::classCS\'");
}
final @NonNull /*@Thrown*/ ClassCS2Class ClassCS2Class = ClassUtil.nonNullState (OPPOSITE_OF_ClassCS2Class_classCS.get(_1));
//
accumulator.add(ClassCS2Class);
}
@NonNull /*@Thrown*/ SequenceValue.Accumulator accumulator_0 = ValueUtil.createSequenceAccumulatorValue(SEQ_CLSSid_Class);
- @Nullable Iterator<?> ITERATOR__1_0 = collect_0.iterator();
+ @NonNull Iterator<?> ITERATOR__1_0 = collect_0.iterator();
@NonNull /*@Thrown*/ SequenceValue collect;
while (true) {
if (!ITERATOR__1_0.hasNext()) {
collect = accumulator_0;
break;
}
- @Nullable /*@NonInvalid*/ ClassCS2Class _1_0 = (ClassCS2Class)ITERATOR__1_0.next();
+ @NonNull /*@NonInvalid*/ ClassCS2Class _1_0 = (ClassCS2Class)ITERATOR__1_0.next();
/**
* class
*/
- if (_1_0 == null) {
- throw new InvalidValueException("Null source for \'classescstraces::ClassCS2Class::class\'");
- }
- final @Nullable /*@Thrown*/ classes.Class symbol_4 = _1_0.getClass_();
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ classes.Class symbol_4 = _1_0.getClass_();
//
accumulator_0.add(symbol_4);
}
@@ -607,10 +607,10 @@ public class classescs2as extends AbstractTransformationExecutor
final @NonNull /*@NonInvalid*/ org.eclipse.ocl.pivot.Class TYP_classescstraces_c_c_ClassCS2Class_0 = idResolver.getClass(CLSSid_ClassCS2Class, null);
final @NonNull /*@NonInvalid*/ org.eclipse.ocl.pivot.Class TYP_classescstraces_c_c_PackageCS2Package_0 = idResolver.getClass(CLSSid_PackageCS2Package, null);
final @NonNull /*@NonInvalid*/ org.eclipse.ocl.pivot.Class TYP_classescstraces_c_c_RootCS2Root_0 = idResolver.getClass(CLSSid_RootCS2Root, null);
- final @NonNull /*@Thrown*/ SetValue allInstances_3 = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_Package, TYP_classes_c_c_Package_1);
- final @NonNull /*@Thrown*/ SetValue allInstances_7 = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_ClassCS, TYP_classescs_c_c_ClassCS_1);
- final @NonNull /*@Thrown*/ SetValue allInstances = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_PackageCS, TYP_classescs_c_c_PackageCS_0);
- final @NonNull /*@Thrown*/ SetValue allInstances_11 = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_RootCS, TYP_classescs_c_c_RootCS_1);
+ final @NonNull /*@NonInvalid*/ SetValue allInstances_3 = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_Package, TYP_classes_c_c_Package_1);
+ final @NonNull /*@NonInvalid*/ SetValue allInstances_7 = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_ClassCS, TYP_classescs_c_c_ClassCS_1);
+ final @NonNull /*@NonInvalid*/ SetValue allInstances = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_PackageCS, TYP_classescs_c_c_PackageCS_0);
+ final @NonNull /*@NonInvalid*/ SetValue allInstances_11 = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_RootCS, TYP_classescs_c_c_RootCS_1);
final List<Package> UNBOXED_allInstances_3 = allInstances_3.asEcoreObjects(idResolver, Package.class);
assert UNBOXED_allInstances_3 != null;
final List<ClassCS> UNBOXED_allInstances_7 = allInstances_7.asEcoreObjects(idResolver, ClassCS.class);
@@ -629,7 +629,7 @@ public class classescs2as extends AbstractTransformationExecutor
mPackageCS2Package_LM(symbol_7);
}
}
- final @NonNull /*@Thrown*/ SetValue allInstances_0 = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_PackageCS2Package, TYP_classescstraces_c_c_PackageCS2Package_0);
+ final @NonNull /*@NonInvalid*/ SetValue allInstances_0 = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_PackageCS2Package, TYP_classescstraces_c_c_PackageCS2Package_0);
final List<PackageCS2Package> UNBOXED_allInstances_0 = allInstances_0.asEcoreObjects(idResolver, PackageCS2Package.class);
assert UNBOXED_allInstances_0 != null;
;
@@ -672,7 +672,7 @@ public class classescs2as extends AbstractTransformationExecutor
mClassCS2Class_LM(symbol_31);
}
}
- final @NonNull /*@Thrown*/ SetValue allInstances_6 = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_ClassCS2Class, TYP_classescstraces_c_c_ClassCS2Class_0);
+ final @NonNull /*@NonInvalid*/ SetValue allInstances_6 = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_ClassCS2Class, TYP_classescstraces_c_c_ClassCS2Class_0);
final List<ClassCS2Class> UNBOXED_allInstances_6 = allInstances_6.asEcoreObjects(idResolver, ClassCS2Class.class);
assert UNBOXED_allInstances_6 != null;
;
@@ -686,7 +686,7 @@ public class classescs2as extends AbstractTransformationExecutor
for (ClassCS classCS_4 : UNBOXED_allInstances_7) {
if (classCS_4 != null) {
final @NonNull /*@NonInvalid*/ org.eclipse.ocl.pivot.Class TYP_classes_c_c_Class_0 = idResolver.getClass(CLSSid_Class, null);
- final @NonNull /*@Thrown*/ SetValue allInstances_8 = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_Class, TYP_classes_c_c_Class_0);
+ final @NonNull /*@NonInvalid*/ SetValue allInstances_8 = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_Class, TYP_classes_c_c_Class_0);
final List<classes.Class> UNBOXED_allInstances_8 = allInstances_8.asEcoreObjects(idResolver, classes.Class.class);
assert UNBOXED_allInstances_8 != null;
;
@@ -706,7 +706,7 @@ public class classescs2as extends AbstractTransformationExecutor
mRootCS2Root_LM(symbol_47);
}
}
- final @NonNull /*@Thrown*/ SetValue allInstances_10 = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_RootCS2Root, TYP_classescstraces_c_c_RootCS2Root_0);
+ final @NonNull /*@NonInvalid*/ SetValue allInstances_10 = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_RootCS2Root, TYP_classescstraces_c_c_RootCS2Root_0);
final List<RootCS2Root> UNBOXED_allInstances_10 = allInstances_10.asEcoreObjects(idResolver, RootCS2Root.class);
assert UNBOXED_allInstances_10 != null;
;
@@ -720,7 +720,7 @@ public class classescs2as extends AbstractTransformationExecutor
for (RootCS rootCS_4 : UNBOXED_allInstances_11) {
if (rootCS_4 != null) {
final @NonNull /*@NonInvalid*/ org.eclipse.ocl.pivot.Class TYP_classes_c_c_Root_0 = idResolver.getClass(CLSSid_Root, null);
- final @NonNull /*@Thrown*/ SetValue allInstances_12 = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_Root, TYP_classes_c_c_Root_0);
+ final @NonNull /*@NonInvalid*/ SetValue allInstances_12 = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_Root, TYP_classes_c_c_Root_0);
final List<Root> UNBOXED_allInstances_12 = allInstances_12.asEcoreObjects(idResolver, Root.class);
assert UNBOXED_allInstances_12 != null;
;
diff --git a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src-gen/cg/classescs2as_Bug459225.java b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src-gen/cg/classescs2as_Bug459225.java
index 8766cb69d..b0aa7542c 100644
--- a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src-gen/cg/classescs2as_Bug459225.java
+++ b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src-gen/cg/classescs2as_Bug459225.java
@@ -34,6 +34,7 @@ import org.eclipse.ocl.pivot.library.logical.BooleanNotOperation;
import org.eclipse.ocl.pivot.library.oclany.OclAnyOclAsTypeOperation;
import org.eclipse.ocl.pivot.library.oclany.OclAnyOclIsKindOfOperation;
import org.eclipse.ocl.pivot.library.string.StringConcatOperation;
+import org.eclipse.ocl.pivot.utilities.ClassUtil;
import org.eclipse.ocl.pivot.utilities.ValueUtil;
import org.eclipse.ocl.pivot.values.InvalidValueException;
import org.eclipse.ocl.pivot.values.SetValue;
@@ -106,51 +107,28 @@ public class classescs2as_Bug459225 extends AbstractTransformationExecutor
* endif
*/
public @Nullable /*@NonInvalid*/ String computeName(final @NonNull /*@NonInvalid*/ NamedElementCS self_0) {
- @Nullable /*@Caught*/ Object CAUGHT_container;
- try {
- final @Nullable /*@Thrown*/ Object container = ClassifierOclContainerOperation.INSTANCE.evaluate(evaluator, self_0);
- CAUGHT_container = container;
- }
- catch (Exception e) {
- CAUGHT_container = ValueUtil.createInvalidValue(e);
- }
final @NonNull /*@NonInvalid*/ IdResolver idResolver = evaluator.getIdResolver();
+ final @Nullable /*@NonInvalid*/ Object container = ClassifierOclContainerOperation.INSTANCE.evaluate(evaluator, self_0);
final @Nullable /*@Thrown*/ String name_0 = self_0.getName();
- @Nullable /*@Caught*/ Object CAUGHT_not;
- try {
- final /*@NonInvalid*/ boolean symbol_0 = (CAUGHT_container == null) || (CAUGHT_container instanceof InvalidValueException);
- final @Nullable /*@Thrown*/ Boolean not = BooleanNotOperation.INSTANCE.evaluate(symbol_0);
- CAUGHT_not = not;
- }
- catch (Exception e) {
- CAUGHT_not = ValueUtil.createInvalidValue(e);
- }
+ final /*@NonInvalid*/ boolean symbol_0 = container == null;
+ final @Nullable /*@NonInvalid*/ Boolean not = BooleanNotOperation.INSTANCE.evaluate(symbol_0);
@NonNull /*@Caught*/ Object CAUGHT_oclIsKindOf;
try {
final @NonNull /*@NonInvalid*/ Class TYP_classescs_c_c_NamedElementCS_0 = idResolver.getClass(CLSSid_NamedElementCS, null);
- if (CAUGHT_container instanceof InvalidValueException) {
- throw (InvalidValueException)CAUGHT_container;
- }
- final /*@Thrown*/ boolean oclIsKindOf = OclAnyOclIsKindOfOperation.INSTANCE.evaluate(evaluator, CAUGHT_container, TYP_classescs_c_c_NamedElementCS_0).booleanValue();
+ final /*@Thrown*/ boolean oclIsKindOf = OclAnyOclIsKindOfOperation.INSTANCE.evaluate(evaluator, container, TYP_classescs_c_c_NamedElementCS_0).booleanValue();
CAUGHT_oclIsKindOf = oclIsKindOf;
}
catch (Exception e) {
CAUGHT_oclIsKindOf = ValueUtil.createInvalidValue(e);
}
- final @Nullable /*@Thrown*/ Boolean and = BooleanAndOperation.INSTANCE.evaluate(CAUGHT_not, CAUGHT_oclIsKindOf);
+ final @Nullable /*@Thrown*/ Boolean and = BooleanAndOperation.INSTANCE.evaluate(not, CAUGHT_oclIsKindOf);
if (and == null) {
throw new InvalidValueException("Null if condition");
}
@Nullable /*@Thrown*/ String symbol_1;
if (and) {
final @NonNull /*@NonInvalid*/ Class TYP_classescs_c_c_NamedElementCS_1 = idResolver.getClass(CLSSid_NamedElementCS, null);
- if (CAUGHT_container instanceof InvalidValueException) {
- throw (InvalidValueException)CAUGHT_container;
- }
- final @Nullable /*@Thrown*/ NamedElementCS oclAsType = (NamedElementCS)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, CAUGHT_container, TYP_classescs_c_c_NamedElementCS_1);
- if (oclAsType == null) {
- throw new InvalidValueException("Null source for \'classescs::NamedElementCS::computeName() : String[?]\'");
- }
+ final @NonNull /*@Thrown*/ NamedElementCS oclAsType = ClassUtil.nonNullState((NamedElementCS)OclAnyOclAsTypeOperation.INSTANCE.evaluate(evaluator, container, TYP_classescs_c_c_NamedElementCS_1));
final @Nullable /*@Thrown*/ String computeName = this.computeName(oclAsType);
final @NonNull /*@Thrown*/ String sum = StringConcatOperation.INSTANCE.evaluate(computeName, STR__c_c);
final @NonNull /*@Thrown*/ String sum_0 = StringConcatOperation.INSTANCE.evaluate(sum, name_0);
@@ -198,7 +176,7 @@ public class classescs2as_Bug459225 extends AbstractTransformationExecutor
CAUGHT_name = ValueUtil.createInvalidValue(e);
}
final /*@NonInvalid*/ boolean symbol_1 = (CAUGHT_name == null) || (CAUGHT_name instanceof InvalidValueException);
- final @Nullable /*@Thrown*/ Boolean not = BooleanNotOperation.INSTANCE.evaluate(symbol_1);
+ final @Nullable /*@NonInvalid*/ Boolean not = BooleanNotOperation.INSTANCE.evaluate(symbol_1);
if (not == null) {
throw new InvalidValueException("Null if condition");
}
@@ -234,7 +212,7 @@ public class classescs2as_Bug459225 extends AbstractTransformationExecutor
// creations
// assignments
// mapping statements
- final @NonNull /*@Thrown*/ SetValue allInstances = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_PackageCS, TYP_classescs_c_c_PackageCS_0);
+ final @NonNull /*@NonInvalid*/ SetValue allInstances = ClassifierAllInstancesOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_PackageCS, TYP_classescs_c_c_PackageCS_0);
final List<PackageCS> UNBOXED_allInstances = allInstances.asEcoreObjects(idResolver, PackageCS.class);
assert UNBOXED_allInstances != null;
;
diff --git a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src-gen/cg/hsv2hls.java b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src-gen/cg/hsv2hls.java
index 6d1689226..77c6982f4 100644
--- a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src-gen/cg/hsv2hls.java
+++ b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src-gen/cg/hsv2hls.java
@@ -126,7 +126,7 @@ public class hsv2hls extends AbstractTransformationExecutor
// creations
// assignments
// mapping statements
- final @NonNull /*@Thrown*/ SetValue objectsOfKind = ModelObjectsOfKindOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_HSVNode, models[0/*hsv*/], TYP_HSVTree_c_c_HSVNode_0);
+ final @NonNull /*@NonInvalid*/ SetValue objectsOfKind = ModelObjectsOfKindOperation.INSTANCE.evaluate(evaluator, SET_CLSSid_HSVNode, models[0/*hsv*/], TYP_HSVTree_c_c_HSVNode_0);
final List<HSVNode> UNBOXED_objectsOfKind = objectsOfKind.asEcoreObjects(idResolver, HSVNode.class);
assert UNBOXED_objectsOfKind != null;
;
@@ -181,8 +181,8 @@ public class hsv2hls extends AbstractTransformationExecutor
final @Nullable /*@Thrown*/ String name = hsvRoot.getName();
middleRoot.setName(name);
// mapping statements
- final @Nullable /*@Thrown*/ List<HSVNode> children = hsvRoot.getChildren();
- assert children != null;
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ List<HSVNode> children = hsvRoot.getChildren();
;
for (HSVNode hsvChild : children) {
if (hsvChild != null) {
@@ -230,8 +230,8 @@ public class hsv2hls extends AbstractTransformationExecutor
final @Nullable /*@Thrown*/ String name = hsvNode.getName();
middleNode_1.setName(name);
// mapping statements
- final @Nullable /*@Thrown*/ List<HSVNode> children = hsvNode.getChildren();
- assert children != null;
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ List<HSVNode> children = hsvNode.getChildren();
;
for (HSVNode hsvChild : children) {
if (hsvChild != null) {
@@ -276,8 +276,8 @@ public class hsv2hls extends AbstractTransformationExecutor
final @Nullable /*@Thrown*/ String name = middleNode.getName();
hlsNode.setName(name);
// mapping statements
- final @Nullable /*@Thrown*/ List<HSVNode2HLSNode> children = middleNode.getChildren();
- assert children != null;
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ List<HSVNode2HLSNode> children = middleNode.getChildren();
;
for (HSVNode2HLSNode middleChild : children) {
if (middleChild != null) {
@@ -319,16 +319,17 @@ public class hsv2hls extends AbstractTransformationExecutor
// assignments
final @Nullable /*@Thrown*/ HSVNode2HLSNode parent = middleNode_0.getParent();
if (parent == null) {
- throw new InvalidValueException("Null source for \'HSV2HLS::HSVNode2HLSNode::hls\'");
+ throw new InvalidValueException("Null source for \'\'http://www.eclipse.org/qvt/examples/0.1/HSVtoHLS\'::HSVNode2HLSNode::hls\'");
}
- final @Nullable /*@Thrown*/ HLSNode hls = parent.getHls();
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ HLSNode hls = parent.getHls();
hlsNode.setParent(hls);
middleNode_0.setHls(hlsNode);
final @Nullable /*@Thrown*/ String name = middleNode_0.getName();
hlsNode.setName(name);
// mapping statements
- final @Nullable /*@Thrown*/ List<HSVNode2HLSNode> children = middleNode_0.getChildren();
- assert children != null;
+ @SuppressWarnings("null")
+ final @NonNull /*@Thrown*/ List<HSVNode2HLSNode> children = middleNode_0.getChildren();
;
for (HSVNode2HLSNode middleChild : children) {
if (middleChild != null) {

Back to the top