Java generator handles package collision