Changes between Version 51 and Version 52 of j2p
- Timestamp:
- 12/05/23 15:47:59 (12 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
j2p
v51 v52 168 168 169 169 170 The translators are all in standardized directories. If there is a translator for class {{{a.b.C}}} then this must be in the class {{{tudelft.utilities.j2p.t.a.b.C}}}. This makes it easy to find the translator class, and requires minimum extra naming conventions.170 The translators are all in standardized directories. If there is a translator for class {{{a.b.C}}} then this must be in the class {{{tudelft.utilities.j2p.t.a.b.C}}}. This makes it easy to find the translator class, makes everything pluggable through the maven dependency plugins, and requires minimum extra naming conventions. 171 171 172 172 The translators generally follow the same inheritance hierarchy as the original classes. So if {{{a.b.P}}} is the parent class of {{{a.b.C}}}, then there usually is a glass {{{tudelft.utilities.j2p.t.a.b.P}}} that is the parent translator of {{{tudelft.utilities.j2p.t.a.b.C}}}. The latter forwards shared translation matters to the parent class as much as possible. A simple example can be seen in {{{tudelft.utilities.j2p.t.java.lang.ArithmeticException}}}, which forwards almost everything to the RuntimeException translator which in turn forwards everything to Exception etc.