For covariant return types and generics a compiler must generate [synthetic bridge methods|https://docs.oracle.com/javase/tutorial/java/generics/bridgeMethods.html]. Weld does not intercept these methods, instead the underlying implementation methods are intercepted. However, this approach does not work if a bridge method impl uses {{invokespecial}} instruction. Note that neither JLS nor JVM spec define how bridge methods should be implemented. |
|