@@ -128,7 +128,10 @@ Class {
128128 ' tAnnotationElement' ,
129129 ' javaLiteral' ,
130130 ' javaArrayAnnotationElement' ,
131- ' javaTypePattern'
131+ ' javaTypePattern' ,
132+ ' tConditionalStatement' ,
133+ ' tLoopStatement' ,
134+ ' javaVarTypeExpression'
132135 ],
133136 #category : ' FAST-Java-Model-Generator' ,
134137 #package : ' FAST-Java-Model-Generator'
@@ -799,6 +802,8 @@ FASTJavaMetamodelGenerator >> defineClasses [
799802 javaLongTypeExpression withTesting.
800803 javaShortTypeExpression := self newClassNamed: #ShortTypeExpression comment: ' I represent a short type' .
801804 javaShortTypeExpression withTesting.
805+ javaVarTypeExpression := self newClassNamed: #VarTypeExpression comment: ' I represent a var type (type inference)' .
806+ javaVarTypeExpression withTesting.
802807 javaVoidTypeExpression := self newClassNamed: #VoidTypeExpression comment: ' I represent a short type' .
803808 javaVoidTypeExpression withTesting.
804809
@@ -914,12 +919,17 @@ FASTJavaMetamodelGenerator >> defineHierarchy [
914919 javaCaseStatement -- | > tStatementBlock.
915920 javaContinueStatement -- | > tStatement.
916921 javaDoWhileStatement -- | > tStatement.
922+ javaDoWhileStatement -- | > tConditionalStatement.
923+ javaDoWhileStatement -- | > tLoopStatement.
917924 javaForStatement -- | > tStatement.
925+ javaForStatement -- | > tConditionalStatement.
926+ javaForStatement -- | > tLoopStatement.
918927
919928 javaIdentifier -- | > javaVariableExpression.
920929 javaIdentifier -- | > tReceiver.
921930
922931 javaIfStatement -- | > tStatement.
932+ javaIfStatement -- | > tConditionalStatement.
923933
924934 javaArrayAnnotationElement -- | > tAnnotationElement.
925935 javaArrayAnnotationElement -- | > tExpression. " because annotationElement=value are modeled as assignment expression"
@@ -990,6 +1000,8 @@ FASTJavaMetamodelGenerator >> defineHierarchy [
9901000
9911001 javaVariableDeclarator -- | > tEntity.
9921002 javaWhileStatement -- | > tStatement.
1003+ javaWhileStatement -- | > tConditionalStatement.
1004+ javaWhileStatement -- | > tLoopStatement.
9931005 javaMethodInvocation -- | > tNamedEntity.
9941006 javaCastExpression -- | > tExpression.
9951007 javaCastExpression -- | > tReceiver.
@@ -1000,6 +1012,7 @@ FASTJavaMetamodelGenerator >> defineHierarchy [
10001012
10011013 javaTryCatchStatement -- | > tStatement.
10021014 javaForEachStatement -- | > tStatement.
1015+ javaForEachStatement -- | > tLoopStatement.
10031016 javaUnaryExpression -- | > tExpression.
10041017
10051018 javaNewExpression -- | > tExpression.
@@ -1252,10 +1265,6 @@ FASTJavaMetamodelGenerator >> defineRelations [
12521265 <> - ((tExpression property: #javaLabeledCaseStatementOwner ) comment:
12531266 ' The javaLabeledCaseStatement owner (if possible)' ).
12541267
1255- ((javaForEachStatement property: #body ) comment:
1256- ' The body of the for-each statement' )
1257- <> - ((tStatement property: #javaForEachStatementOwner ) comment:
1258- ' The javaForEachStatement owner (if possible)' ).
12591268 ((javaForEachStatement property: #list ) comment:
12601269 ' The list that the for-each statement iterates over' )
12611270 <> - ((tExpression property: #javaForEachStatementOwner ) comment:
@@ -1302,10 +1311,6 @@ FASTJavaMetamodelGenerator >> defineRelations [
13021311 <> - ((javaVariableExpression property: #javaCatchParameterOwnler )
13031312 comment: ' The javaCatchPartParameterOwner owner (if possible)' ).
13041313
1305- ((javaIfStatement property: #condition ) comment:
1306- ' The condition of the statement' )
1307- <> - ((tExpression property: #ifConditionOwner ) comment:
1308- ' I represent a condition for my owner' ).
13091314 ((javaIfStatement property: #elsePart ) comment: ' else part' )
13101315 <> - ((tStatement property: #ifElsePartOwner ) comment:
13111316 ' The if owner (if possible)' ).
@@ -1333,10 +1338,6 @@ FASTJavaMetamodelGenerator >> defineRelations [
13331338 ((tExpression property: #infixOperationRightOperandOwner ) comment:
13341339 ' The right operand (if possible)' ).
13351340
1336- ((javaForStatement property: #condition ) comment:
1337- ' The condition of the statement' )
1338- <> - ((tExpression property: #forConditionOwner ) comment:
1339- ' I represent a condition for my owner' ).
13401341 ((javaForStatement property: #incrementor ) comment:
13411342 ' Expression evaluated at the end of each loop' )
13421343 <> - ((tStatement property: #forIncrementorOwner ) comment:
@@ -1345,34 +1346,12 @@ FASTJavaMetamodelGenerator >> defineRelations [
13451346 ' Expression used at initialization phase of a for loop' )
13461347 <> - ((tStatement property: #forIninitializerOwner ) comment:
13471348 ' I am the initializer of the for' ).
1348- ((javaForStatement property: #body ) comment:
1349- ' A statement to be evaluated in the loop' )
1350- <> - ((tStatement property: #forBodyOwner ) comment:
1351- ' I am the body of the for' ).
13521349
13531350 ((javaSwitchStatement property: #condition ) comment:
13541351 ' The condition of the statement' )
13551352 <> - ((tExpression property: #switchConditionOwner ) comment:
13561353 ' I represent a condition for my owner' ).
13571354
1358- ((javaDoWhileStatement property: #condition ) comment:
1359- ' The condition of the statement' )
1360- <> - ((tExpression property: #doConditionOwner ) comment:
1361- ' I represent a condition for my owner' ).
1362- ((javaDoWhileStatement property: #body ) comment:
1363- ' A statement to be evaluated in the loop' )
1364- <> - ((tStatement property: #doBodyOwner ) comment:
1365- ' I am the body of the do' ).
1366-
1367- ((javaWhileStatement property: #condition ) comment:
1368- ' The condition of the statement' )
1369- <> - ((tExpression property: #whileConditionOwner ) comment:
1370- ' I represent a condition for my owner' ).
1371- ((javaWhileStatement property: #body ) comment:
1372- ' A statement to be evaluated in the loop' )
1373- <> - ((tStatement property: #whileBodyOwner ) comment:
1374- ' I am the body of the do' ).
1375-
13761355 ((javaInitializer property: #statementBlock ) comment:
13771356 ' Statements block of the behavioural entity' )
13781357 <> - ((tStatementBlock property: #javaInitializerOwner ) comment:
@@ -1586,23 +1565,29 @@ FASTJavaMetamodelGenerator >> defineTraits [
15861565
15871566 " From FAST"
15881567 tEntity := self remoteTrait: #TEntity withPrefix: #FAST .
1589- tComment := self remoteTrait: #TComment withPrefix: #FAST .
1590- tWithComments := self remoteTrait: #TWithComments withPrefix: #FAST .
1591- tExpression := self remoteTrait: #TExpression withPrefix: #FAST .
1592- tStatement := self remoteTrait: #TStatement withPrefix: #FAST .
1568+
1569+ tBooleanLiteral := self remoteTrait: #TBooleanLiteral withPrefix: #FAST .
15931570 tCharacterLiteral := self remoteTrait: #TCharacterLiteral withPrefix: #FAST .
15941571 tLiteral := self remoteTrait: #TLiteral withPrefix: #FAST .
1595- tVariableExpression := self remoteTrait: #TVariableExpression withPrefix: #FAST .
1596- tNamedBehaviouralEntity := self remoteTrait: #TNamedBehaviouralEntity withPrefix: #FAST .
15971572 tNullPointerLiteral := self remoteTrait: #TNullPointerLiteral withPrefix: #FAST .
15981573 tStringLiteral := self remoteTrait: #TStringLiteral withPrefix: #FAST .
1574+
1575+ tExpression := self remoteTrait: #TExpression withPrefix: #FAST .
1576+ tVariableExpression := self remoteTrait: #TVariableExpression withPrefix: #FAST .
1577+
1578+ tStatement := self remoteTrait: #TStatement withPrefix: #FAST .
1579+ tConditionalStatement := self remoteTrait: #TConditionalStatement withPrefix: #FAST .
1580+ tExpressionStatement := self remoteTrait: #TExpressionStatement withPrefix: #FAST .
1581+ tLoopStatement := self remoteTrait: #TLoopStatement withPrefix: #FAST .
1582+ tReturnStatement := self remoteTrait: #TReturnStatement withPrefix: #FAST .
1583+ tStatementBlock := self remoteTrait: #TStatementBlock withPrefix: #FAST .
1584+
1585+ tComment := self remoteTrait: #TComment withPrefix: #FAST .
1586+ tInvocation := self remoteTrait: #TInvocation withPrefix: #FAST .
1587+ tNamedBehaviouralEntity := self remoteTrait: #TNamedBehaviouralEntity withPrefix: #FAST .
1588+ tNamedEntity := self remoteTrait: #TNamedEntity withPrefix: #FAST .
15991589 tScopableEntity := self remoteTrait: #TScopableEntity withPrefix: #FAST .
16001590 tVariableEntity := self remoteTrait: #TVariableEntity withPrefix: #FAST .
1601- tStatementBlock := self remoteTrait: #TStatementBlock withPrefix: #FAST .
1602- tExpressionStatement := self remoteTrait: #TExpressionStatement withPrefix: #FAST .
1591+ tWithComments := self remoteTrait: #TWithComments withPrefix: #FAST .
16031592 tWithParameters := self remoteTrait: #TWithParameters withPrefix: #FAST .
1604- tNamedEntity := self remoteTrait: #TNamedEntity withPrefix: #FAST .
1605- tReturnStatement := self remoteTrait: #TReturnStatement withPrefix: #FAST .
1606- tBooleanLiteral := self remoteTrait: #TBooleanLiteral withPrefix: #FAST .
1607- tInvocation := self remoteTrait: #TInvocation withPrefix: #FAST
16081593]
0 commit comments