Java - move Gson to superclasses.