Changes between Version 47 and Version 48 of j2p


Ignore:
Timestamp:
11/06/23 10:12:36 (13 months ago)
Author:
wouter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • j2p

    v47 v48  
    2323There are two main translation components in the core:
    24241. The translator that parses java file with [https://github.com/javaparser/javaparser Javaparser] and creates equivalent python code.
    25 2. per-java-class translators that know how to translate all calls to any java class method or field into equivalent python code. This code is using introspection and assumes all used java classes are available, either through libraries or from the java compiler.
     252. per-java-class translators that know how to translate all calls to any java class method or field into equivalent python code. This code is using java-side code introspection to determine argument types, and therefore requires all referred java classes are actually available in compiled form, either through libraries or from the java compiler.
    2626
    27 (1) generic and used for all java programs. It is currently pretty complete but details will be filled in over time as the need arises to support more java syntax.
     27(1) is generic and used for all java programs. It is currently pretty complete but details will be filled in over time as the need arises to support more java syntax.
    2828
    2929(2) is currently very partial. The reason is that there are a huge number of java classes and even more 3rd party libraries, and almost every field and function in it will need a specialized translator. This will grow slowly over time as needed.
    3030
    3131
    32 The mechanism assumes a fixed mapping from java to python objects, as in the table below. This fixed mapping is needed to ensure the translator can be sure which objects will appear on the python side of the translation, so that proper actions can be taken to further the translation.
     32The 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.
    3333
    3434==== constructs