private Map<File, Map.Entry<byte[], Collection<String>>> loadStatus(File statusFile) {
        if (statusFile.exists()) {
            log.debug("Load grammars dependency status: " + statusFile);

            try {
                ObjectInputStream in = new ObjectInputStream(new FileInputStream(
                            statusFile));

                try {
                    @SuppressWarnings("unchecked")
                    Map<File, Map.Entry<byte[], Collection<String>>> data =
                        (Map<File, Map.Entry<byte[], Collection<String>>>)
                        in.readObject();

                    return data;
                } finally {
                    in.close();
                }
            } catch (Exception ex) {
                log.warn("Could not load grammar dependency status information", ex);
            }
        }

        return new HashMap<File, Map.Entry<byte[], Collection<String>>>();
    }
Resolves the given grammar name.

@param   name  the name.
@param   path  the relative path.

@return  the grammar file.
antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/GrammarDependencies.java