@SuppressWarnings("unchecked")
public SearchMethodBinding(Class<? extends IResource> theReturnResourceType, Method theMethod, FhirContext theContext, Object theProvider) {
super(theReturnResourceType, theMethod, theContext, theProvider);
Search search = theMethod.getAnnotation(Search.class);
this.myQueryName = StringUtils.defaultIfBlank(search.queryName(), null);
this.myCompartmentName = StringUtils.defaultIfBlank(search.compartmentName(), null);
this.myDeclaredResourceType = (Class<? extends IResource>) theMethod.getReturnType();
this.myIdParamIndex = MethodUtil.findIdParameterIndex(theMethod);
Description desc = theMethod.getAnnotation(Description.class);