Changes between Version 86 and Version 87 of j2p
- Timestamp:
- 06/10/24 10:02:18 (5 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
j2p
v86 v87 71 71 Fields in Java have to be initialized in the {{{__init__}}} function in the python translation. 72 72 73 === Overload ingmethods73 === Overloaded methods 74 74 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. 75 75 76 76 When a method is overloaded, the translator adds {{{@dispatch}}} annotations in the translated code as required by plum. 77 77 78 78 79 {{{#!td style="background: #fee" 80 If you have two methods overloading each other, and both methods end up with the same signature in python, then plum will NOT warn you and just use the last definition only. Therefore your translated code will not work as expected. An example is if your code has both {{{get(BigInteger x)}}} and {{{get(long x)}}}, both will be translated to {{{def get(self, x:int)}}} and plum will use only the last one defined. 81 }}} 79 82 80 83