org.jfrog.build.extractor.clientConfiguration
Class PatternMatcher

java.lang.Object
  extended by org.jfrog.build.extractor.clientConfiguration.PatternMatcher

public abstract class PatternMatcher
extends java.lang.Object

Ant-style path pattern matcher


Method Summary
static boolean match(java.lang.String pattern, java.lang.String str, boolean isCaseSensitive)
          THIS CODE WAS BORROWED FROM org.apache.tools.ant.types.selectors.SelectorUtils
static boolean pathConflicts(java.lang.String path, IncludeExcludePatterns patterns)
          Indicates whether the given path conflicts with the given patterns.
A path will conflict if: The include patterns list is not empty, and the path does not match any contained pattern.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

pathConflicts

public static boolean pathConflicts(java.lang.String path,
                                    IncludeExcludePatterns patterns)
Indicates whether the given path conflicts with the given patterns.
A path will conflict if:

Parameters:
path - Path to check
patterns - Patterns to match
Returns:
True if the path conflicts

match

public static boolean match(java.lang.String pattern,
                            java.lang.String str,
                            boolean isCaseSensitive)

THIS CODE WAS BORROWED FROM org.apache.tools.ant.types.selectors.SelectorUtils

Tests whether or not a string matches against a pattern. The pattern may contain two special characters:
'*' means zero or more characters
'?' means one and only one character

Parameters:
pattern - The pattern to match against. Must not be null.
str - The string which must be matched against the pattern. Must not be null.
isCaseSensitive - Whether or not matching should be performed case sensitively.
Returns:
true if the string matches against the pattern, or false otherwise.