Package org.jboss.weld.metadata
Class Selectors
java.lang.Object
org.jboss.weld.metadata.Selectors
Algorithm taken from Apache Ant's SelectorUtils class and modified to handle
class hierarchies.
- Author:
- Pete Muir, Apache Ant Team
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe pattern that matches an arbitrary number of directories. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanTests whether or not a string matches against a pattern.static booleanTests whether or not a given path matches a given pattern.static booleanTests whether or not a given path matches a given pattern.
-
Field Details
-
DEEP_TREE_MATCH
The pattern that matches an arbitrary number of directories.- Since:
- Ant 1.8.0
- See Also:
-
-
Method Details
-
matchPath
Tests whether or not a given path matches a given pattern. If you need to call this method multiple times with the same pattern you should rather use TokenizedPath- Parameters:
pattern- The pattern to match against. Must not benull.str- The path to match, as a String. Must not benull.- Returns:
trueif the pattern matches against the string, orfalseotherwise.- See Also:
-
TokenizedPath
-
matchPath
Tests whether or not a given path matches a given pattern. If you need to call this method multiple times with the same pattern you should rather use TokenizedPattern- Parameters:
pattern- The pattern to match against. Must not benull.str- The path to match, as a String. Must not benull.isCaseSensitive- Whether or not matching should be performed case sensitively.- Returns:
trueif the pattern matches against the string, orfalseotherwise.- See Also:
-
TokenizedPattern
-
match
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 benull.str- The string which must be matched against the pattern. Must not benull.caseSensitive- Whether or not matching should be performed case sensitively.- Returns:
trueif the string matches against the pattern, orfalseotherwise.
-