Class PatternMatcher

    • Constructor Summary

      Constructors 
      Constructor Description
      PatternMatcher()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void match​(java.lang.String pattern, java.net.URI[] uris, boolean isNullInclusive)  
      void match​(java.util.regex.Pattern pattern, java.net.URI[] uris, boolean isNullInclusive)
      Find jar names from the provided list matching a pattern.
      abstract void matched​(java.net.URI uri)  
      void matchPatterns​(java.util.regex.Pattern pattern, java.net.URI[] uris, boolean isNullInclusive)  
      • Methods inherited from class java.lang.Object

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

      • PatternMatcher

        public PatternMatcher()
    • Method Detail

      • matched

        public abstract void matched​(java.net.URI uri)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • match

        public void match​(java.lang.String pattern,
                          java.net.URI[] uris,
                          boolean isNullInclusive)
                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • match

        public void match​(java.util.regex.Pattern pattern,
                          java.net.URI[] uris,
                          boolean isNullInclusive)
                   throws java.lang.Exception
        Find jar names from the provided list matching a pattern. If the pattern is null and isNullInclusive is true, then all jar names will match. A pattern is a set of acceptable jar names. Each acceptable jar name is a regex. Each regex can be separated by either a "," or a "|". If you use a "|" this or's together the jar name patterns. This means that ordering of the matches is unimportant to you. If instead, you want to match particular jar names, and you want to match them in order, you should separate the regexs with "," instead. Eg "aaa-.*\\.jar|bbb-.*\\.jar" Will iterate over the jar names and match in any order. Eg "aaa-*\\.jar,bbb-.*\\.jar" Will iterate over the jar names, matching all those starting with "aaa-" first, then "bbb-".
        Parameters:
        pattern - the pattern
        uris - the uris to test the pattern against
        isNullInclusive - if true, an empty pattern means all names match, if false, none match
        Throws:
        java.lang.Exception - if fundamental error in pattern matching
      • matchPatterns

        public void matchPatterns​(java.util.regex.Pattern pattern,
                                  java.net.URI[] uris,
                                  boolean isNullInclusive)
                           throws java.lang.Exception
        Throws:
        java.lang.Exception