jeudi 19 septembre 2019

How to dynamically transform a Java Interface to make its return type wrapped in Futures?

Given the following interface:

interface DummyAPI {
  int f1(int x);
  String f2();
}

What I want is a way to write a class like this:

class Futurized<T> {
}

where effectively, the methods of Futurized<DummyAPI> would effectively be:

    Future<Integer> f1(int x);
    Future<String> f2();





Aucun commentaire:

Enregistrer un commentaire