Changes between Version 54 and Version 55 of j2p
- Timestamp:
- 12/07/23 12:17:18 (11 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
j2p
v54 v55 35 35 The 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 36 37 But 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)}}}. 37 But 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)}}}. These are all handled in the translator classes, in this example in {{{tudelft.utilities.j2p.t.java.util.Iterator}}}. 38 38 39 39 ==== constructs