code: private void _registerDir (@Nonnull final Path aDir) throws IOException
    {
      if (LOGGER.isDebugEnabled ())
        LOGGER.debug ("Register directory " +
                      aDir +
                      (m_bRecursive && !m_bRegisterRecursiveManually ? " (recursively)" : ""));
  
      final WatchEvent.Kind <?> [] aKinds = new WatchEvent.Kind <?> [] { StandardWatchEventKinds.ENTRY_CREATE,
                                                                         StandardWatchEventKinds.ENTRY_DELETE,
                                                                         StandardWatchEventKinds.ENTRY_MODIFY };
  
      // throws exception when using with modifiers even if null
      final WatchKey aKey = m_aModifiers != null ? aDir.register (m_aWatcher, aKinds, m_aModifiers)
                                                 : aDir.register (m_aWatcher, aKinds);
      m_aKeys.put (aKey, aDir);
    }
docs: Register the given directory with the WatchService
  
  @param aDir
  Directory to be watched. May not be <code>null</code>.