Valhalla is what you want, at least for some of it.
interface Box<T> {
T get();
void set(T val);
}
interface IntBox extends Box<int> {
int get();
void set(int val);
}
https://openjdk.org/projects/valhalla/