LUCENE-5207: More strict checks for invalid method signatures (currently only double is accepted as parameter or return type). The method must be static, too.