1 15 package org.apache.hivemind.methodmatch; 16 17 import org.apache.hivemind.service.ClassFabUtils; 18 import org.apache.hivemind.service.MethodSignature; 19 20 25 public class ParameterFilter extends MethodFilter 26 { 27 private int _parameterIndex; 28 private String _parameterType; 29 30 31 public ParameterFilter(int index, String type) 32 { 33 _parameterIndex = index; 34 _parameterType = type; 35 } 36 37 public boolean matchMethod(MethodSignature sig) 38 { 39 Class actualType = sig.getParameterTypes()[_parameterIndex]; 40 String actualTypeName = ClassFabUtils.getJavaClassName(actualType); 41 42 return actualTypeName.equals(_parameterType); 43 } 44 45 } 46 | Popular Tags |