* @since 1.0
*/
protected SourceUnit addToCompilationUnit(final CompilationUnit cu, final Source source, final Sources sources)
throws CompileException {
if (source instanceof TextSource) {
TextSource textSource = (TextSource)source;
return cu.addSource(textSource.getId(), textSource.getText());
} else if (source instanceof FileSource) {
FileSource fileSource = (FileSource)source;
return cu.addSource(fileSource.getFile());
} else if (source instanceof UrlSource) {
UrlSource urlSource = (UrlSource)source;