Hide java implementation types from library users

This is a trick I have learned from https://speakerdeck.com/agemooij/from-a-to-l-designing-scala-libraries 

It allows you to hide type dependencies which are implementation details and allows to remove the javax import from production code while still being compatible with javax types if they are already used by the client code.