//TODO: do we need to check validity of 'name', or can we trust the filemanager to handle that?
JavaFileObject jfo = _fileManager.getJavaFileForOutput(
StandardLocation.SOURCE_OUTPUT, name.toString(), JavaFileObject.Kind.SOURCE, null);
URI uri = jfo.toUri();
if (_createdFiles.contains(uri)) {
throw new FilerException("Source file already created : " + name); //$NON-NLS-1$
}
_createdFiles.add(uri);
// hook the file object's writers to create compilation unit and add to addedUnits()
return new HookedJavaFileObject(jfo, jfo.getName(), this);