@ 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 .