Changes between Version 59 and Version 60 of j2p


Ignore:
Timestamp:
12/19/23 12:49:22 (11 months ago)
Author:
wouter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • j2p

    v59 v60  
    9999You will have to call an explicit converter, typically toString(), on the arguments that need to be converted into the proper argument type.
    100100
     101
     102Another example is when varargs are involved:
     103{{{
     104public sum(int... values) {
     105  return sumlist(values);
     106}
     107
     108public sumList(int[] values) {
     109  return ....;
     110}
     111}}}
     112
     113The call sumlist(values) uses auto boxing, but here the translation is from {{{int...}}} to {{{int[]}}}. A similar situation is when you do a for loop over varargs, like
     114{{{
     115public sum(int... values) {
     116  for (v: values) { .... }
     117}
     118}}}
     119
     120All these complications around varargs led us to currently not support varargs.
     121
    101122==== More notes:
    102123* some classes like {{{Arrays}}} or {{{Override}}} do not have a direct python equivalent. calls to static functions in these classes can still be translated.