protected T parse(DeploymentUnit unit, Set<String> names, String suffix, T root) throws Exception
{
if (names == null || names.isEmpty())
throw new IllegalArgumentException("Null or empty names.");
VFSDeploymentUnit vfsDeploymentUnit = (VFSDeploymentUnit)unit;
List<VirtualFile> files = new ArrayList<VirtualFile>();
Set<String> missingFiles = new HashSet<String>();
Set<String> ignoredFiles = new HashSet<String>();
for (String name : names)
{
if (ignoreName(unit, name))
{
ignoredFiles.add(name);
}
else
{
// try finding altDD file
VirtualFile file = getMetadataFile(vfsDeploymentUnit, matchFileToClass(unit, name), name, false);
if (file == null)
{
List<VirtualFile> matched = vfsDeploymentUnit.getMetaDataFiles(name, suffix, getMetaDataTypeFilter(unit));
if (matched != null && matched.isEmpty() == false)
files.addAll(matched);
else
missingFiles.add(name);
}