Moving the GenerationContext to Java