Changes between Version 53 and Version 54 of j2p


Ignore:
Timestamp:
12/07/23 12:16:19 (11 months ago)
Author:
wouter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • j2p

    v53 v54  
    3232
    3333
    34 The mechanism assumes a fixed mapping from java classes to python classes, as in the table below. Also it is assumed that the equivalent classes have roughly the same functionality, even if the actual function names and arguments may differ. This fixed mapping is needed to ensure the translator can be sure which classes will appear on the python side of the translation, so that proper actions can be taken to further the translation.
     34The mechanism is flexible in its mapping from java classes to python classes.
     35The general approach is to assume a fixed mapping from java classes to python classes, as in the table below. Also it is assumed that the equivalent classes have roughly the same functionality, even if the actual function names and arguments may differ. This fixed mapping simplifies translation.
     36
     37But the translator can intercept special classes and make dedicated translations. For instance if a class C is implementing {{{Iterator}}} and it is of class C, translating {{{it.next()}}} gives {{{next(it)}}}, and the definition {{{void iterator()}}} translates to {{{__iter__(self)}}}.
    3538
    3639==== constructs