Package org.eclipse.jetty.util
Class PatternMatcher
java.lang.Object
org.eclipse.jetty.util.PatternMatcher
- Direct Known Subclasses:
MetaInfConfiguration.ContainerPathNameMatcher
,MetaInfConfiguration.WebAppPathNameMatcher
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
Find jar names from the provided list matching a pattern.abstract void
void
matchPatterns
(Pattern pattern, URI[] uris, boolean isNullInclusive)
-
Constructor Details
-
PatternMatcher
public PatternMatcher()
-
-
Method Details
-
matched
- Throws:
Exception
-
match
- Throws:
Exception
-
match
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 patternuris
- the uris to test the pattern againstisNullInclusive
- if true, an empty pattern means all names match, if false, none match- Throws:
Exception
- if fundamental error in pattern matching
-
matchPatterns
- Throws:
Exception
-