@Requires({
    "kind != null",
    "name != null",
    "desc != null",
    "extraCount >= 0"
  })
  MethodContractHandle getMethodHandle(ContractKind kind,
      String name, String desc, int extraCount) {
    ArrayList<MethodContractHandle> candidates = methodHandles.get(name);
    if (candidates == null) {
      return null;
    }

    for (MethodContractHandle h : candidates) {
      if (kind.equals(h.getKind())
          && descArgumentsMatch(desc, h.getContractMethod().desc, extraCount)) {
        return h;
      }
    }
    return null;
  }
@ Requires ( { "kind != null" , "name != null" , "desc != null" , "extraCount >= 0" } ) MethodContractHandle getMethodHandle ( ContractKind kind , String name , String desc , int extraCount ) { ArrayList < MethodContractHandle > candidates = methodHandles . get ( name ) ; if ( candidates == null ) { return null ; } for ( MethodContractHandle h : candidates ) { if ( kind . equals ( h . getKind ( ) ) && descArgumentsMatch ( desc , h . getContractMethod ( ) . desc , extraCount ) ) { return h ; } } return null ; }
Returns the first MethodHandle object matching the specified
criteria.

@param kind the kind of the handle
@param name the target method name
@param desc the target method descriptor
@param extraCount the number of extra parameters in the contract
method
@return a handle matching the criteria, or {@code null}