code: public Class<?> getClassForName(String className) {
          if (!StringUtils.hasText(className)) {
              return null;
          }
  
          for (Class<?> c : allClasses) {
              if (c.getName().equals(className)) {
                  return c;
              }
          }
          return null;
      }
docs: Retrieves a class from the GrailsApplication for the given name.
  
  @param className The class name
  @return Either the Class instance or null if it doesn't exist