public class NamePatternMatcher extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Pattern[] |
itemExcludeFilters |
protected Pattern[] |
itemIncludeFilters |
protected org.apache.commons.logging.Log |
logger |
| Constructor and Description |
|---|
NamePatternMatcher(org.apache.commons.logging.Log logger,
String includePattern,
String excludePattern) |
| Modifier and Type | Method and Description |
|---|---|
Pattern[] |
createPatterns(String patternString)
Returns an array of Patterns.
|
boolean |
isIncluded(String string)
Returns true if a given object property satisfies the include/exclude patterns.
|
static String |
replaceWildcardInStringWithString(String wildcard,
String pattern,
String replacement) |
String[] |
tokenizePattern(String pattern)
Returns an array of valid regular expressions.
|
protected org.apache.commons.logging.Log logger
protected Pattern[] itemIncludeFilters
protected Pattern[] itemExcludeFilters
public Pattern[] createPatterns(String patternString)
"billing_*,user?" will become an array of two expressions:
^billing_.*$
^user.?$
public String[] tokenizePattern(String pattern)
"billing_*,user?" will become an array of two expressions:
^billing_.*$
^user.?$
public boolean isIncluded(String string)
Copyright © 2001–2014 Apache Cayenne. All rights reserved.