RubyModule generatorModule = jsonExtModule.defineModuleUnder("Generator");
RubyClass stateClass =
generatorModule.defineClassUnder("State", runtime.getObject(),
GeneratorState.ALLOCATOR);
stateClass.defineAnnotatedMethods(GeneratorState.class);
info.generatorStateClass = new WeakReference<RubyClass>(stateClass);
RubyModule generatorMethods =
generatorModule.defineModuleUnder("GeneratorMethods");
GeneratorMethods.populate(info, generatorMethods);