code: public synchronized DirectoryScanner setExcludes(String[] excludes) {
          if (excludes == null) {
              this.excludes = null;
          } else {
              this.excludes = new String[excludes.length];
              for (int i = 0; i < excludes.length; i++) {
                  this.excludes[i] = normalizePattern(excludes[i]);
              }
          }
          return this;
      }
docs: Set the list of exclude patterns to use. All '/' and '\' characters
  are replaced by <code>File.separatorChar</code>, so the separator used
  need not match <code>File.separatorChar</code>.
  <p>
  When a pattern ends with a '/' or '\', "**" is appended.
  
  @param excludes A list of exclude patterns.
  May be <code>null</code>, indicating that no files
  should be excluded. If a non-<code>null</code> list is
  given, all elements must be non-<code>null</code>.