private void findDeclaredPaths(final File parent, final File file, final Map<String, ResourceType> resourceTypes,
            final Map<String, SortedMap<String, Resource>> resources) {
        if (file.isDirectory()) {
            for (final File child : file.listFiles()) {
                if (!child.isHidden()) {
                    findDeclaredPaths(file, child, resourceTypes, resources);
                }
            }
        } else {
            if (!file.isHidden()) {
                final String fileName = file.getName();

                String fileContents = "";
                try {
                    fileContents = FileUtilities.getFileContents(file);
                } catch (final IOException e) {
                    e.printStackTrace();
                }

                for (final ResourceType resourceType : resourceTypes.values()) {
                    final Map<String, Resource> typeMap = resources.get(resourceType.getType());

                    if (typeMap != null) {
                        for (final Resource resource : typeMap.values()) {
                            if (resourceType.doesFileDeclareResource(parent, fileName, fileContents, resource.getName().replace("_", "[_\\.]"))) {
                                resource.addDeclaredPath(file.getAbsolutePath());

                                final String configuration = parent.getName();
                                resource.addConfiguration(configuration);
                            }
                        }
                    }
                }
            }
        }
    }