Generate script code for IOs through SDK

Hi,

is there a better way to generate the required URScript to read an IO from the IO class I got out of the model?
Having to switch on IO.getType() and IO.getInterfaceType to generate get_InterfaceType_Type_in() does not feel right.

I’m thinking of something like ScriptWriter.readIO(io) and to make it complete ScriptWriter.writeIO(io).