Files.walkTree is causing Assignment Branch Condition too high
Well I figured out a way to refactor my code, and obtained a non-complex code by creating a method that returns the visitor named getSimpleFileVisitor(). I also created another method that will allow me to print the results that I named printFinalResults(). I have also refactored the method's name to walkFileTree().
Maybe my question was a little bit ambiguous, sorry for any inconvenience.

private void walkFileTree() {
    try{
        Files.walkFileTree(Paths.get(rootDirectory.getCanonicalPath()), EnumSet.of(FileVisitOption.FOLLOW_LINKS), Integer.MAX_VALUE, getSimpleFileVisitor());
    }catch(IOException e) {
        System.out.println(e.getMessage());
    }
    printFinalResults();
}

private SimpleFileVisitor&lt;Path&gt; getSimpleFileVisitor(){
    SimpleFileVisitor&lt;Path&gt; simpleFileVisitor = new SimpleFileVisitor&lt;Path&gt;() {
        @Override
        public FileVisitResult visitFile(Path path, BasicFileAttributes attrs) throws IOException {
            addToDictionary(path);
            return FileVisitResult.CONTINUE;
        }
    };
    return simpleFileVisitor;
}

private void printFinalResults() {
    System.out.println(this.indexedFileContents.keySet().size() + " files read in directory " + this.rootDirectory);
}