Changes between Version 178 and Version 179 of j2p


Ignore:
Timestamp:
01/07/25 16:00:02 (3 months ago)
Author:
wouter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • j2p

    v178 v179  
    7373
    7474=== Overloaded methods
     75
    7576Overloaded methods can not be handled by default python. To support it, an external library {{{plum-dispatch==2.2.2}}} is used. If you use overloading, you need to have plum installed to run your code. Check also the #@NonNull section.
    7677
     78{{{#!td style="background: #fee"
     79The library needed for adding overloading support in python is not compatible with python mockito (a library needed to support unit testing in python). Therefore mocking overloaded methods does not work. Assuming the code will be tested as well,  it is recommended to avoid overloading completely. Other library combinations were also tried but the present combination seems the least worse at this time.
     80}}}
     81
     82
    7783When a method is overloaded, the translator adds {{{@dispatch}}} annotations  in the translated code as required by plum.
    7884
    79 {{{#!td style="background: #fee"
    80 The Plum library is not recognised or handled properly by python mockito (a library needed to support unit testing in python). Therefore mocking overloaded methods does not work. Assuming the code will be tested as well,  it is recommended to avoid overloading completely. Other library combinations were also tried but the present combination seems the least worse at this time.
    81 }}}
     85
    8286
    8387{{{#!td style="background: #fee"