Changes between Version 108 and Version 109 of j2p


Ignore:
Timestamp:
07/25/24 17:16:04 (3 months ago)
Author:
wouter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • j2p

    v108 v109  
    113113Inner classes (classes inside classes) have very limited support.
    114114
    115 When an inner class translator is needed, eg A$B where B is an inner class of A, the translator searches for a translator for class A/B where A is used as a *directory*. If it is found, then that translator B is used.
     115When an inner class translator is needed, eg p.A$B where B is an inner class of A, the translator searches for a translator for class p.a/B where p/a is used as a *directory* and is the lower case version of A. If it is found, then that translator B is used.
     116
     117Note that that translated class will be in package p.a, rather than inside class p.A. Therefore this mechanism, has limited use in practice.
    116118
    117119Otherwise, no support is available. This includes anonymous inner classes. You can not import, call or use inner classes. This is for many reasons but the brief summary:
     
    125127* For the non-static inner class: pass the enclosing class as argument to the child class constructor. You may have to use more tricks to get around cyclic dependencies.
    126128
    127 ===== Exception to inner classes
    128 There are a very few exceptions to the 'no inner classes' rule. If some particular inner classes, particularly constants, are used in very specific translators, these translators may opt to attempt to recognise these and process them separately. One example is the JsonDeserializer (jackson-t package) that recognises use of "com.fasterxml.jackson.databind.JsonDeserializer.None". Check the documentation of the translators for details.
     129===== Workaround
     130If some particular inner classes, particularly constants, are used in very specific translators, these translators may opt to attempt to recognise these and process them separately (thus avoiding calling the translator for them). One example is the JsonDeserializer (jackson-t package) that recognises use of "com.fasterxml.jackson.databind.JsonDeserializer.None".
    129131
    130132=== Auto Boxing