code: @SuppressWarnings("unchecked")
      public final Generator<Object> getGenerator() {
          if (generator != null) {
              return generator;
          }
          LOG.info("Creating generator: {}", className);
          if (className == null) {
              throw new IllegalStateException("Class name was not set: " + getName());
          }
          if (context == null) {
              throw new IllegalStateException("Context class loader was not set: " + getName() + " / " + className);
          }
          final Object obj = Utils4J.createInstance(className, context.getClassLoader());
          if (!(obj instanceof Generator<?>)) {
              throw new IllegalStateException("Expected class to be of type '" + Generator.class.getName() + "', but was: " + className);
          }
          generator = (Generator<Object>) obj;
          generator.initialize(this);
          return generator;
      }
docs: Returns an existing generator instance or creates a new one if it's the first call to this method.
  
  @return Generator of type {@link #className}.