if (qName.getPackageName().equals(pPackageName) && (qName.getClassName() + ".java").equals(pFileName)) {
throw new IllegalStateException("A Java source file names " + pFileName + " in package " + pPackageName + " already exists.");
}
}
TextFile result = new TextFileImpl(pPackageName, pFileName);
files.add(result);
return result;
}