Difference: DpHipeTools (108 vs. 109)

Revision 1092013-09-04 - JavierDiaz

Line: 1 to 1
 
META TOPICPARENT name="WritingTasks"
<-- ANALYTICS CODE - DO NOT EDIT -->
<-- Google Analytics script BEGIN -->
<-- Google Analytics script END -->
Line: 295 to 295
 
  • Register it

The rules for providing JythonConverters are:

Changed:
<
<
  • The type that needs the converter should define it (in the same module)
  • If the module where the type is defined (for example JDK types) cannot import share_interpreter (where JythonConverter is defined) then, by default, it should be share_interpreter itself the one that defines the converter.
  • A converter cannot be overwritten (but one can be registered for a subclass). This prevents that some client module can break the converters.
>
>
  • The type that needs the converter should define it (in the same module) if possible. Alternatively, the type can implement __repr__ (importing Jython).
  • If the module where the type is defined cannot import share_interpreter (where JythonConverter is defined) then, by default, it should be share_interpreter (or the "next" module "above" share_interpreter that already imports the type) the one that defines the converter.
  • A converter cannot be overwritten (but one can be registered for a subclass). This prevents that some client module can break more "basic" converters.
 
  • Extend AbstractJythonConverter instead of implementing directly the JythonConverter interface.
  • Your converter should call other converters for its elements (rather than doing it itself).
 
This site is powered by the TWiki collaboration platform Powered by Perl