private void addGenerator(Generator generator) throws InitializationError 
    {
        Class<?> klass = generator.klass();
        Class<? extends Gen<?>> genClass = generator.generator();

        // This might not be possible, but I'm unsure.
        if (klass == null || genClass == null) {
            throw new InitializationError("Bad @Generator found.");
        }

        if (classGenerators.containsKey(klass)) {
            throw new InitializationError("Duplicate generators found.");
        }

        classGenerators.put(klass, genClass);
    }