public boolean assignIfBestMatch(MethodDeclaration declaration){
  assert !finalized : "Assigning on a method that has already been finalized";
  if (!isMatch(declaration.getParameters())) {
    return false;
  }
  if (this.bestMatchMethod.isPresent()) {
    if (this.bestMatchMethod.get().getParameters().size() > declaration.getParameters().size()) {
      return false;
    }
  }
  this.bestMatchMethod=Optional.of(declaration);
  return true;
}

public boolean assignIfBestMatch ( MethodDeclaration declaration ) { assert ! finalized : "Assigning on a method that has already been finalized" ; if ( ! isMatch ( declaration . getParameters ( ) ) ) { return false ; } if ( this . bestMatchMethod . isPresent ( ) ) { if ( this . bestMatchMethod . get ( ) . getParameters ( ) . size ( ) > declaration . getParameters ( ) . size ( ) ) { return false ; } } this . bestMatchMethod = Optional . of ( declaration ) ; return true ; }
assigns this methoddeclaration if it is a match to the params defined for this method .
