Given a situation like the following:
interface A<T>{
default void foo(T t){
System.err.println(new Exception().getStackTrace()[0] + " " + t);
}
}
interface B<T extends SomeConcreteType> extends A<T>{
@Override
default void foo(T t){
System.err.println(new Exception().getStackTrace()[0] + " " + t);
}
}
I'm trying to use reflection to go from a B's foo method to A's foo method. Given that the post erasure parameter types of the two methods are different, how can I do this?
Aucun commentaire:
Enregistrer un commentaire