@ Requires ( { "kind != null" , "name != null" , "desc != null" , "extraCount >= 0" } ) @ Ensures ( { "result != null" , "!result.contains(null)" } ) List < MethodContractHandle > getMethodHandles ( ContractKind kind , String name , String desc , int extraCount ) { ArrayList < MethodContractHandle > candidates = methodHandles . get ( name ) ; if ( candidates == null ) { return Collections . emptyList ( ) ; } ArrayList < MethodContractHandle > matched = new ArrayList < MethodContractHandle > ( ) ; for ( MethodContractHandle h : candidates ) { if ( kind . equals ( h . getKind ( ) ) && descArgumentsMatch ( desc , h . getContractMethod ( ) . desc , extraCount ) ) { matched . add ( h ) ; } } return matched ; }
Returns the MethodHandle objects matching the specified criteria .