short result = -1;
MClass classinfo = getMClass(className);
MClassMethod[] classmethods = classinfo.getClassmethods();
for (int i=0; i<classmethods.length && result==-1; i++) {
MClassMethod method = classmethods[i];
if(method.getName().equalsIgnoreCase(methodName)) {
result = EnvelopeConstants.verbDispatchClassMethodXML;
}
}
if (methodName.equalsIgnoreCase(XOOOF_CLASS_METHOD_GETCLASSINFO)) {
result = EnvelopeConstants.verbDispatchClassMethodXML;
}
MInstanceMethod[] instancemethods = classinfo.getInstancemethods();
for (int i=0; i<instancemethods.length && result==-1; i++) {
MInstanceMethod method = instancemethods[i];
if(method.getName().equalsIgnoreCase(methodName)) {
if (method.getSpecial() != null && method.getSpecial().equalsIgnoreCase("constructor")) {
result = EnvelopeConstants.verbDispatchNewInstanceMethodXML;
} else {
result = EnvelopeConstants.verbDispatchInstanceMethodXML;
}
}