Package org.apache.camel.support
Class PatternHelper
java.lang.Object
org.apache.camel.support.PatternHelper
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isExcludePatternMatch
(String key, String... excludePatterns) static boolean
matchPattern
(String name, String pattern) Matches the name with the given pattern (case insensitive).static boolean
matchPatterns
(String name, String[] patterns) Matches the name with the given patterns (case insensitive).static boolean
matchRegex
(String name, String pattern) Matches the name with the given pattern (case insensitive).
-
Method Details
-
matchPattern
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.
-
matchPatterns
Matches the name with the given patterns (case insensitive).- Parameters:
name
- the namepatterns
- pattern(s) to match- Returns:
- true if match, false otherwise.
- See Also:
-
matchRegex
Matches the name with the given pattern (case insensitive). The match rules are applied in this order:- regular expression match, returns true
- otherwise returns false
- Parameters:
name
- the namepattern
- a pattern to match- Returns:
- true if match, false otherwise.
-
isExcludePatternMatch
-