Changes between Version 178 and Version 179 of j2p
- Timestamp:
- 01/07/25 16:00:02 (3 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
j2p
v178 v179 73 73 74 74 === Overloaded methods 75 75 76 Overloaded 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. 76 77 78 {{{#!td style="background: #fee" 79 The 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 77 83 When a method is overloaded, the translator adds {{{@dispatch}}} annotations in the translated code as required by plum. 78 84 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 82 86 83 87 {{{#!td style="background: #fee"