Skip to content

Commit 42c199e

Browse files
authored
Improvements for Java abstracting
1 parent bf3a2d1 commit 42c199e

File tree

1 file changed

+120
-6
lines changed

1 file changed

+120
-6
lines changed

cg/cgJava2UML.cstl

Lines changed: 120 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ Predicate _1 |-->Function(_1,boolean)
261261
Function _1 |-->Function_1
262262
Comparator _1 |-->Function(_1,(_1,boolean))
263263
AtomicReference _1 |-->_1
264+
Consumer _1 |-->Function(_1, void)
264265

265266
Collection _1 |-->Sequence_1`collectionParameters
266267
Iterable _1 |-->Sequence_1`collectionParameters
@@ -1411,12 +1412,15 @@ _1 > > _2 |-->(_1`queryForm/(2->pow(_2`queryForm)))->oclAsType(long)
14111412

14121413
_1 && _2 |-->_1`queryForm & _2`queryForm
14131414
_1 || _2 |-->_1`queryForm or _2`queryForm
1415+
14141416
_1 & _2 |-->MathLib.bitwiseAnd(_1`queryForm,_2`queryForm)<when> _1 int
14151417
_1 & _2 |-->MathLib.bitwiseAnd(_1`queryForm,_2`queryForm)<when> _1 long
14161418
_1 & _2 |-->_1`queryForm & _2`queryForm
1419+
14171420
_1 | _2 |-->MathLib.bitwiseOr(_1`queryForm,_2`queryForm)<when> _1 int
14181421
_1 | _2 |-->MathLib.bitwiseOr(_1`queryForm,_2`queryForm)<when> _1 long
14191422
_1 | _2 |-->_1`queryForm or _2`queryForm
1423+
14201424
_1 ^ _2 |-->MathLib.bitwiseXor(_1`queryForm,_2`queryForm)<when> _1 int
14211425
_1 ^ _2 |-->MathLib.bitwiseXor(_1`queryForm,_2`queryForm)<when> _1 long
14221426
_1 ^ _2 |-->_1`queryForm xor _2`queryForm
@@ -1613,6 +1617,8 @@ java.lang.reflect.Array . _1 |-->_1`arrayMethodCall
16131617

16141618
Collections . _1 |-->_1`collectionMethodCallQueryForm
16151619

1620+
_1 . _2 |-->(if _1`queryForm->keys()->contains(_2`keyvalue) then _1`queryForm_2`mapMethodCallQueryForm else _2`testdefault endif)<when> _1 Map, _2`methodName getOrDefault
1621+
16161622
_1 . _2 |-->_1`queryForm_2`mapMethodCallQueryForm<when> _1 Map
16171623
_1 . _2 |-->_1`queryForm_2`fileMethodCallQueryForm<when> _1 File
16181624
_1 . _2 |-->_1`queryForm_2`dateMethodCallQueryForm<when> _1 Date
@@ -1633,6 +1639,22 @@ _1 |-->_1`queryForm<when> _1 expression
16331639

16341640
_0 |-->_0
16351641

1642+
methodName::
1643+
_1 ( ) |-->_1
1644+
_1 ( _2 ) |-->_1
1645+
1646+
_* |-->
1647+
1648+
1649+
keyvalue::
1650+
getOrDefault ( _1 ) |-->_1`first
1651+
putIfAbsent ( _1 ) |-->_1`first
1652+
_* |-->
1653+
1654+
testdefault::
1655+
getOrDefault ( _1 ) |-->_1`last
1656+
_* |-->
1657+
16361658

16371659
enumsetMethodCall::
16381660
allOf ( _1 ) |-->_1.allInstances()
@@ -1661,6 +1683,10 @@ byteValue ( ) |-->->oclAsType(int)
16611683
longValue ( ) |-->->oclAsType(long)
16621684
charValue ( ) |-->+""
16631685

1686+
test ( _1 ) |-->->apply(_1)
1687+
accept ( _1 ) |-->->apply(_1)
1688+
apply ( _1 ) |-->->apply(_1)
1689+
16641690
toString ( ) |-->+""
16651691
compareTo ( _1 ) |-->->compareTo(_1)
16661692
compareToIgnoreCase ( _1 ) |-->->toLowerCase()->compareTo(_1->toLowerCase())
@@ -1763,14 +1789,14 @@ limit ( _1 ) |-->.subrange(1,_1)
17631789
skip ( _1 ) |-->.subrange(_1+1)
17641790
reduce ( _1 ) |-->->iterate( _var; _acc : OclAny | _1->apply((_acc,_var)) )
17651791

1766-
apply ( _1 ) |-->->apply(_1)
1767-
17681792
add ( _1 ) |-->->excludes(_1)
17691793
addAll ( _1 ) |-->->intersection(_1`last) /= _1`last
17701794
push ( _1 ) |-->true
17711795

17721796
size ( ) |-->->size()
17731797
length ( ) |-->->size()
1798+
estimateSize ( ) |-->->size()
1799+
getExactSizeIfKnown ( ) |-->->size()
17741800
capacity ( ) |-->->size()
17751801
getFirst ( ) |-->->first()
17761802
firstElement ( ) |-->->first()
@@ -1828,6 +1854,7 @@ listIterator ( _1 ) |-->.subrange(_1+1)->iterator()
18281854

18291855

18301856
get ( _1 ) |-->->at(_1+1)
1857+
getOrDefault ( _1 ) |-->->at(_1+1)
18311858
elementAt ( _1 ) |-->->at(_1+1)
18321859
charAt ( _1 ) |-->->at(_1+1)
18331860
printStackTrace ( ) |-->.printStackTrace()
@@ -1848,6 +1875,8 @@ Stream . _1 |-->_1`streamMethodCallQueryForm
18481875

18491876
Collections . _1 |-->_1`collectionMethodCallQueryForm
18501877

1878+
_1 . _2 |-->if _1`queryForm->keys()->contains(_2`keyvalue) then _1`queryForm_2`mapMethodCallQueryForm else _2`testdefault endif<when> _2`methodName getOrDefault
1879+
18511880
_1 . _2 |-->_1_2`mapMethodCallQueryForm<when> _1 Map
18521881
_1 . _2 |-->_1_2`fileMethodCallQueryForm<when> _1 File
18531882
_1 . _2 |-->_1_2`dateMethodCallQueryForm<when> _1 Date
@@ -2546,6 +2575,73 @@ _1 ( ) |-->_1()
25462575
_1 ( _2 ) |-->_1(_2)
25472576

25482577

2578+
methodCallType::
2579+
super ( ) |-->OclType
2580+
super ( _1 ) |-->OclType
2581+
2582+
this ( ) |-->OclType
2583+
this ( _1 ) |-->OclType
2584+
2585+
parseInt ( _1 ) |-->int
2586+
println ( _1 ) |-->void
2587+
deepToString ( _1 ) |-->String
2588+
2589+
length ( ) |-->int
2590+
size ( ) |-->int
2591+
estimateSize ( ) |-->long
2592+
getExactSizeIfKnown ( ) |-->long
2593+
tryAdvance ( _1 ) |-->boolean
2594+
capacity ( ) |-->int
2595+
2596+
max ( _1 ) |-->OclAny
2597+
min ( _1 ) |-->OclAny
2598+
get ( _1 ) |-->OclAny
2599+
charAt ( _1 ) |-->String
2600+
getTimeInMillis ( ) |-->long
2601+
setTimeInMillis ( _1 ) |-->void
2602+
computeTime ( ) |-->long
2603+
exec ( _1 ) |-->OclProcess
2604+
schedule ( _1 ) |-->void
2605+
scheduleAtFixedRate ( _1 ) |-->void
2606+
2607+
allMatch ( _1 ) |-->boolean
2608+
anyMatch ( _1 ) |-->boolean
2609+
distinct ( ) |-->Sequence
2610+
2611+
filter ( _1 ) |-->Sequence
2612+
mapToInt ( _1 ) |-->Sequence
2613+
stream ( ) |-->Sequence
2614+
forEach ( _1 ) |-->void
2615+
2616+
absolute ( _1 ) |-->void
2617+
updateString ( _1 ) |-->void
2618+
relative ( _1 ) |-->void
2619+
2620+
assertTrue ( _1 ) |-->void
2621+
assertFalse ( _1 ) |-->void
2622+
assertEquals ( _1 ) |-->void
2623+
assertNotEquals ( _1 ) |-->void
2624+
assertNotNull ( _1 ) |-->void
2625+
assertSame ( _1 ) |-->void
2626+
assertNotSame ( _1 ) |-->void
2627+
assertArrayEquals ( _1 ) |-->void
2628+
fail ( ) |-->void
2629+
fail ( _1 ) |-->void
2630+
assertThat ( _1 ) |-->void
2631+
2632+
writeBoolean ( _1 ) |-->void
2633+
writeChar ( _1 ) |-->void
2634+
writeShort ( _1 ) |-->void
2635+
writeInt ( _1 ) |-->void
2636+
writeLong ( _1 ) |-->void
2637+
writeFloat ( _1 ) |-->void
2638+
writeDouble ( _1 ) |-->void
2639+
skipBytes ( _1 ) |-->int
2640+
2641+
_1 ( ) |-->_1()
2642+
_1 ( _2 ) |-->_1(_2)
2643+
2644+
25492645
lambdaParameters::
25502646
( _1 ) |-->lambda _1 : OclAny in
25512647
( _* ) |-->_*`lambdaParameter
@@ -2858,6 +2954,9 @@ _1 ^ _2 |-->_1 xor _2
28582954

28592955
_1 instanceof _2 |-->_1->oclIsKindOf(_2)
28602956

2957+
2958+
_1 . _2 |-->(if _1`queryForm->keys()->contains(_2`keyvalue) then _1`queryForm_2`mapMethodCallQueryForm else _2`testdefault endif)<when> _1 Map, _2`methodName getOrDefault
2959+
28612960
_1 . _2 |-->_1_2`mapMethodCallQueryForm<when> _1 Map
28622961
_1 . _2 |-->_1_2`fileMethodCallQueryForm<when> _1 File
28632962
_1 . _2 |-->_1_2`dateMethodCallQueryForm<when> _1 Date
@@ -3348,6 +3447,8 @@ System . _1 |-->_1`systemMethodCall
33483447

33493448
_1 . _2 |--> for _2`forEachVariable : _1 do\n (_2`forEachUpdateForm)<when> _2 methodCall, _2`isForEachCall true
33503449

3450+
_1 . _2 |--> if _1->keys()->includes(_2`keyvalue) then skip else _1 := _1_2`mapMethodCallSideEffect<when> _1 Map, _2`methodName putIfAbsent
3451+
33513452
_1 . _2 |--> _1 := _1_2`mapMethodCallSideEffect<when> _1 Map
33523453

33533454
_1 . _2 |--> _1 := _1_2`collectionMethodCallSideEffect<when> _1 Collection
@@ -3488,6 +3589,9 @@ HashBag _1 |-->Sequence{}_1`collectionCreationRest
34883589
TreeList _1 |-->Sequence{}_1`collectionCreationRest
34893590

34903591
Stream _1 |-->Sequence{}_1`collectionCreationRest
3592+
IntStream _1 |-->Sequence{}
3593+
LongStream _1 |-->Sequence{}
3594+
DoubleStream _1 |-->Sequence{}
34913595

34923596
JsonArray _1 |-->Sequence{}_1`collectionCreationRest
34933597
JSONArray _1 |-->Sequence{}_1`collectionCreationRest
@@ -3526,6 +3630,8 @@ RandomAccessFile _1 |-->_1`newRAFile
35263630

35273631
Socket _1 |-->OclDatasource.newSocket_1
35283632

3633+
StringTokenizer _1 |-->OclIterator.newOclIterator_String_1`stringTokenizerArguments
3634+
35293635
Thread _1 |-->OclProcess.newOclProcess_1
35303636
Timer _1 |-->OclProcess.newOclProcess("","TimerTask")
35313637
TimerTask _1 |-->OclProcess.newOclProcess_1
@@ -3547,6 +3653,13 @@ _1 _2 |-->_1_2
35473653
_1 |-->_1
35483654

35493655

3656+
stringTokenizerArguments::
3657+
( _1 ) |-->_String(_1)<when> _1 multiple
3658+
( _1 ) |-->(_1)
3659+
_1 |-->_1`stringTokenizerArguments<when> _1 arguments
3660+
3661+
3662+
35503663
isCollectionCreatedName::
35513664
Set _1 |-->true
35523665
HashSet _1 |-->true
@@ -3634,6 +3747,7 @@ intArrayInit::
36343747
[ _1 ] [ _2 ] [ ] |-->Integer.subrange(1,_1)->collect(Integer.subrange(1,_2)->collect(Sequence{}))
36353748
[ ] [ ] [ ] _1 |-->_1
36363749

3750+
36373751
doubleArrayInit::
36383752
[ ] |-->Sequence{}
36393753
[ _1 ] |-->Integer.subrange(1,_1)->collect(0.0)
@@ -4127,12 +4241,12 @@ _1 |-->_1
41274241

41284242

41294243
forIncrement::
4130-
_1 ; _2 ; _3 |--> ; _3`expressionListUpdateForm
4131-
_1 ; ; _2 |--> ; _2`expressionListUpdateForm
4244+
_1 ; _2 ; _3 |--> ; _3`expressionListUpdateForm
4245+
_1 ; ; _2 |--> ; _2`expressionListUpdateForm
41324246
_1 ; ; |-->
4133-
; _1 ; _2 |--> ; _2`expressionListUpdateForm
4247+
; _1 ; _2 |--> ; _2`expressionListUpdateForm
41344248
; _1 ; |-->
4135-
; ; _1 |--> ; _1`expressionListUpdateForm
4249+
; ; _1 |--> ; _1`expressionListUpdateForm
41364250
; ; |-->
41374251
_1 |-->
41384252

0 commit comments

Comments
 (0)