Class PackageNameMatcher
- java.lang.Object
-
- org.eclipse.tycho.extras.docbundle.PackageNameMatcher
-
public class PackageNameMatcher extends Object
An utility class for filtering package names.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PackageNameMatcher
compile(List<String> specs)
Compiles the given list of package name specification strings into a matching object.boolean
matches(String packageName)
Returns true if the given package name matches against any of the patterns in this matcher.String
toString()
-
-
-
Method Detail
-
compile
public static PackageNameMatcher compile(List<String> specs)
Compiles the given list of package name specification strings into a matching object.If the list is empty, the resulting object will never match any package name, which means that
matches(String)
will always returnfalse
.- Parameters:
specs
- The list of package name specifications. For details on specification syntax see#compile(String)
.- Returns:
- A new matching object.
- Throws:
IllegalArgumentException
- Thrown if the given argument isnull
or if any of the strings in the list is an invalid package name specification.
-
matches
public boolean matches(String packageName)
Returns true if the given package name matches against any of the patterns in this matcher.- Returns:
- Always
false
if the given package name isnull
or an empty string.
-
-