code: @SuppressWarnings("unchecked")
  	public synchronized Class<T> compile(final String packageName, final String className,
  		final String javaSource)
  	{
  
  		final String qualifiedClassName = CompilerExtensions.newQualifiedClassName(packageName,
  			className);
  
  		final BaseJavaFileObject javaSourceFileObject = new BaseJavaFileObject(className,
  			javaSource);
  		final BaseJavaFileObject compiledJavaFileObject = new BaseJavaFileObject(
  			qualifiedClassName);
  		this.baseJavaFileManager.initialize(javaSourceFileObject, compiledJavaFileObject);
  
  		final CompilationTask task = this.systemJavaCompiler.getTask(null, this.baseJavaFileManager,
  			this.diagnosticCollectors, null, null, Arrays.asList(javaSourceFileObject));
  
  		if (!task.call())
  		{
  			final String message = CompilerExtensions
  				.generateCompilationStacktrace(this.diagnosticCollectors);
  			throw new CompilerRuntimeException(message);
  		}
  
  		final Class<T> newClass = (Class<T>)this.runtimeCompilerClassLoader
  			.findClass(qualifiedClassName);
  
  		return newClass;
  	}
docs: Tries to compile the given String with the java source with the given package name and the
  given class name and returns the generated {@link Class} object.
  
  @param packageName
  the package name
  @param className
  the class name
  @param javaSource
  the java source
  @return the generated {@link Class} object.