both|both methods have same erasure, yet neither overrides the other

这段代码会报一个编译错误,both methods have same erasure, yet neither overrides the other。
这个错误的意思是,两个方法在类型擦除后,具有相同的原生类型参数列表,但是也不能覆盖另一个方法。
泛型类型在编译后,会做类型擦除,只剩下原生类型。如参数列表中的T类型会编译成Object,但是会有一个Signature。
尽管两个getValue方法具有相同的字节码,但是类型参数信息用 一个新的签名(signature) 属性记录在类模式中。JVM 在装载类时记录这个签名信息,并在运行时通过反射使它可用。
【both|both methods have same erasure, yet neither overrides the other】这就导致了这个方法既不能作为覆盖父类getValue方法的方法,也不能作为getValue方法的重载。

    推荐阅读