code: private PathFilter getFileFilter() {
      final String extension = (this.expectedExtension.startsWith(".")) ?
          this.expectedExtension :
          "." + this.expectedExtension;
  
      return new PathFilter() {
        @Override
        public boolean accept(Path path) {
          return path.getName().endsWith(extension) &&
              !(schemaInSourceDir && path.getName().equals(schemaFile)) ;
        }
      };
    }
docs: This method is to filter out files that don't need to be processed by extension
  @return the pathFilter