class MessageDataGenerator implements MessageClassGenerator {

    void generate(MessageSpec message) throws Exception {
        if (message.struct().versions().contains(Short.MAX_VALUE)) {
            throw new RuntimeException("Message " + message.name() + " does " +
                "not specify a maximum version.");
        }
        structRegistry.register(message);
        schemaGenerator.generateSchemas(message);
        messageFlexibleVersions = message.flexibleVersions();
        generateClass(Optional.of(message),
            message.dataClassName(),
            message.struct(),
            message.struct().versions());
        headerGenerator.generate();
    }

      MessageDataGenerator(String packageName);

}