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>();
for (String name : names)
{
// try finding altDD file
VirtualFile file = getMetadataFile(vfsDeploymentUnit, matchFileToClass(unit, name), name, false);
if (file == null)
{
List<VirtualFile> matched = vfsDeploymentUnit.getMetaDataFiles(name, suffix);
if (matched != null && matched.isEmpty() == false)
files.addAll(matched);
else
missingFiles.add(name);
}