return false;
}
}
// test the methods using pattern matching
WildcardHelper wildcard = new WildcardHelper();
String methodCopy ;
if (method == null ) { // no method specified
methodCopy = "";
}
else {
methodCopy = new String(method);
}
for (String pattern : includeMethods) {
if (pattern.contains("*")) {
int[] compiledPattern = wildcard.compilePattern(pattern);
HashMap<String,String> matchedPatterns = new HashMap<String, String>();
boolean matches = wildcard.match(matchedPatterns, methodCopy, compiledPattern);
if (matches) {
return true; // run it, includeMethods takes precedence
}
}
else {
if (pattern.equals(methodCopy)) {
return true; // run it, includeMethods takes precedence
}
}
}
if (excludeMethods.contains("*") ) {
return false;
}
// CHECK ME: Previous implementation used include method
for ( String pattern : excludeMethods) {
if (pattern.contains("*")) {
int[] compiledPattern = wildcard.compilePattern(pattern);
HashMap<String,String> matchedPatterns = new HashMap<String, String>();
boolean matches = wildcard.match(matchedPatterns, methodCopy, compiledPattern);
if (matches) {
// if found, and wasn't included earlier, don't run it
return false;
}
}