Issues with wrapping Java code

One part of this solution that wasn't very elegant was the wrapper code that transformed between CPython and Java flight data. It is a necessary step to convert between these types when linking these systems together. While a wrapper code solved our immediate problem, the maintenance of that code can grow.

Since it is very likely that other classes require the same attention, whether they are input arguments or results, a solution that is easier to maintain is needed. The behavior involves wrapping the Java service and checking inputs and outputs. This is exactly the type of use case that aspect oriented programming is well suited for.

It is left as an exercise for the reader to code an aspect that can scan inputs and outputs and apply some sort of mapping between the CPython types and Java types, and wire it up to replace the java wrapper.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.97.53