public Function lookup(Class<?> functionClass,String name,Class<?>... paramTypes){
  List<Method> functionMethods=new ArrayList<Method>();
  addFunctionMethods(functionClass,functionMethods);
  Collections.sort(functionMethods,new PolymorphicComparator());
  for (  Method fMethod : functionMethods) {
    FunctionMethod fAnno=fMethod.getAnnotation(FunctionMethod.class);
    if ((name.equals(fMethod.getName())) || name.equals(fAnno.value())) {
      if (isCallable(paramTypes,fMethod.getParameterTypes())) {
        return createFunction(functionClass,fMethod);
      }
    }
  }
  return null;
}

public Function lookup ( Class < ? > functionClass , String name , Class < ? > ... paramTypes ) { List < Method > functionMethods = new ArrayList < Method > ( ) ; addFunctionMethods ( functionClass , functionMethods ) ; Collections . sort ( functionMethods , new PolymorphicComparator ( ) ) ; for ( Method fMethod : functionMethods ) { FunctionMethod fAnno = fMethod . getAnnotation ( FunctionMethod . class ) ; if ( ( name . equals ( fMethod . getName ( ) ) ) || name . equals ( fAnno . value ( ) ) ) { if ( isCallable ( paramTypes , fMethod . getParameterTypes ( ) ) ) { return createFunction ( functionClass , fMethod ) ; } } } return null ; }
looks up the appropriate function for the given parameter types .
