Package org.apache.camel.support
Class PatternHelper
- java.lang.Object
-
- org.apache.camel.support.PatternHelper
-
public final class PatternHelper extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isExcludePatternMatch(String key, String... excludePatterns)
static boolean
matchPattern(String name, String pattern)
Matches the name with the given pattern (case insensitive).
-
-
-
Method Detail
-
matchPattern
public static boolean matchPattern(String name, String pattern)
Matches the name with the given pattern (case insensitive). The match rules are applied in this order:- exact match, returns true
- wildcard match (pattern ends with a * and the name starts with the pattern), returns true
- regular expression match, returns true
- otherwise returns false
- Parameters:
name
- the namepattern
- a pattern to match- Returns:
- true if match, false otherwise.
-
-