In order to simplify JNI generator, initializing functions for arrays needs to be generated.
For custom types (Class, Enum, Union), consider hiding swap functions inside constructors
to reduce size of generated message handlers.
Currently object is first created and then the _net_to_host_XXX function is called.
The function actually does the intialization, so perhaps init would be better name than swap.
Another reason are Enums, which need to know endianess when created.