// if we reach this point we have at last one parameter or return type, that
// is different in its specified form. That means we have to create a bridge method!
ClassNode testmr = correctToGenericsSpec(genericsSpec,omr);
if (!mr.isDerivedFrom(testmr)) {
throw new RuntimeParserException(
"the return type is incompatible with "+
oldMethod.getTypeDescriptor()+
" in "+oldMethod.getDeclaringClass().getName(),
overridingMethod);
}
if ((oldMethod.getModifiers()&ACC_FINAL)!=0) {
throw new RuntimeParserException(
"cannot override final method "+
oldMethod.getTypeDescriptor()+
" in "+oldMethod.getDeclaringClass().getName(),
overridingMethod);
}
if (oldMethod.isStatic() != overridingMethod.isStatic()){
throw new RuntimeParserException(
"cannot override method "+
oldMethod.getTypeDescriptor()+
" in "+oldMethod.getDeclaringClass().getName()+
" with disparate static modifier",
overridingMethod);