名前だけからメソッドの戻り値の型を知りたいのですが、そのコードを使用していますが、うまくいきませんでした(常にnullを返します):
public Object getType(String key) throws Exception {
        Object returnType = null;
        String name = key;
        Method[] methods = name.getClass().getMethods();
        for(int i =0; i < methods.length ; i++){
            if(key.equals(methods[i])){
                returnType = methods[i].getReturnType();
            }
        }
        return returnType;
    }