public Class<?> parseCodeBlock(final String codeBlock, final String classNameForCodeBlock) {
Class<?> parsedClazz;
try {
parsedClazz = gcl.parseClass(codeBlock, classNameForCodeBlock + ".groovy");
} catch (CompilationFailedException e) {
throw new CodeBlockCompilerException(e.getMessage());
}
return parsedClazz;
}