001 package org.shiftone.jrat.core.criteria; 002 003 004 import org.shiftone.jrat.util.log.Logger; 005 import org.shiftone.jrat.util.regex.Matcher; 006 007 008 /** 009 * @author jeff@shiftone.org (Jeff Drost) 010 */ 011 public class ClassMatcherMethodCriteria implements MethodCriteria { 012 013 private static final Logger LOG = Logger.getLogger(ClassMatcherMethodCriteria.class); 014 private final Matcher matcher; 015 016 public ClassMatcherMethodCriteria(Matcher matcher) { 017 this.matcher = matcher; 018 } 019 020 021 public boolean isMatch(String className, long modifier) { 022 return matcher.isMatch(className); 023 } 024 025 026 public boolean isMatch(String className, String methodName, String signature, long modifier) { 027 return matcher.isMatch(className); 028 } 029 030 031 public String toString() { 032 return "<class-match>" + matcher + "</class-match>"; 033 } 034 }