private static String superMethodName ( Method method ) { String returnType = method . getReturnType ( ) . getName ( ) ; return "super$" + method . getName ( ) + "$" + returnType . replace ( ' ' , ' ' ) . replace ( ' ' , ' ' ) . replace ( ' ' , ' ' ) ; }
The super method must include the return type otherwise its ambiguous for methods with covariant return types .