Class GlobExpressionEvaluator

  • All Implemented Interfaces:
    java.nio.file.FileVisitor<java.nio.file.Path>

    public class GlobExpressionEvaluator
    extends java.nio.file.SimpleFileVisitor<java.nio.file.Path>
    This class evaluates a globbing expression on the current file system.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.nio.file.FileSystem fileSystem  
      protected boolean isLocatedInJar  
      protected java.util.regex.Pattern pattern  
      protected java.util.Set<java.net.URI> result  
    • Constructor Summary

      Constructors 
      Constructor Description
      GlobExpressionEvaluator​(java.lang.String pathRegex, java.nio.file.FileSystem fs, boolean isLocatedInJar)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<java.net.URI> evaluate​(java.io.File start)  
      protected java.util.Set<java.net.URI> getResult()  
      java.nio.file.FileVisitResult visitFile​(java.nio.file.Path path, java.nio.file.attribute.BasicFileAttributes attribs)  
      • Methods inherited from class java.nio.file.SimpleFileVisitor

        postVisitDirectory, preVisitDirectory, visitFileFailed
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • pattern

        protected java.util.regex.Pattern pattern
      • result

        protected java.util.Set<java.net.URI> result
      • fileSystem

        protected java.nio.file.FileSystem fileSystem
      • isLocatedInJar

        protected boolean isLocatedInJar
    • Constructor Detail

      • GlobExpressionEvaluator

        public GlobExpressionEvaluator​(java.lang.String pathRegex,
                                       java.nio.file.FileSystem fs,
                                       boolean isLocatedInJar)
    • Method Detail

      • visitFile

        public java.nio.file.FileVisitResult visitFile​(java.nio.file.Path path,
                                                       java.nio.file.attribute.BasicFileAttributes attribs)
        Specified by:
        visitFile in interface java.nio.file.FileVisitor<java.nio.file.Path>
        Overrides:
        visitFile in class java.nio.file.SimpleFileVisitor<java.nio.file.Path>
      • getResult

        protected java.util.Set<java.net.URI> getResult()
      • evaluate

        public java.util.Set<java.net.URI> evaluate​(java.io.File start)