code: public Class parseClass(GroovyCodeSource codeSource, boolean shouldCacheSource) throws CompilationFailedException {
          synchronized (sourceCache) {
              Class answer = sourceCache.get(codeSource.getName());
              if (answer != null) return answer;
              answer = doParseClass(codeSource);
              if (shouldCacheSource) sourceCache.put(codeSource.getName(), answer);
              return answer;
          }
      }
docs: Parses the given code source into a Java class. If there is a class file
  for the given code source, then no parsing is done, instead the cached class is returned.
  
  @param shouldCacheSource if true then the generated class will be stored in the source cache
  @return the main class defined in the given script