// INVOKESPECIAL is an InvokeInstruction, the argument and return types are resolved/verified,
// too. So are the allowed method names.
String classname = o.getClassName(cpg);
JavaClass jc = Repository.lookupClass(classname);
Method[] ms = jc.getMethods();
Method m = null;
for (int i=0; i<ms.length; i++){
if ( (ms[i].getName().equals(o.getMethodName(cpg))) &&
(Type.getReturnType(ms[i].getSignature()).equals(o.getReturnType(cpg))) &&
(objarrayequals(Type.getArgumentTypes(ms[i].getSignature()), o.getArgumentTypes(cpg))) ){
m = ms[i];
break;
}
}
if (m == null){
constraintViolated(o, "Referenced method '"+o.getMethodName(cpg)+"' with expected signature not found in class '"+jc.getClassName()+"'. The native verfier does allow the method to be declared in some superclass or implemented interface, which the Java Virtual Machine Specification, Second Edition does not.");
}
JavaClass current = Repository.lookupClass(myOwner.getClassName());
if (current.isSuper()){
if ((Repository.instanceOf( current, jc )) && (!current.equals(jc))){
if (! (o.getMethodName(cpg).equals(Constants.CONSTRUCTOR_NAME) )){
// Special lookup procedure for ACC_SUPER classes.
int supidx = -1;
Method meth = null;
while (supidx != 0){
supidx = current.getSuperclassNameIndex();
current = Repository.lookupClass(current.getSuperclassName());
Method[] meths = current.getMethods();