throws NoSuchMethodException {
final Map result = new HashMap();
// if it is not an object
if (objectID == 0) {
final ObjectInstance instance = this.resolveObject(className);
final ClassData classData = this.resolveClass(className);
if (null == instance && null == classData) {
throw new NoSuchMethodException(JSONRPCResult.MSG_ERR_NOMETHOD);
}
// Look up the class, object instance and method objects
if (instance != null) {
final ClassData cd = ClassAnalyzer.getInstance().getClassData(
instance.getClazz());
result.putAll(cd.getMethodMap());
} else if (methodName.equals(CONSTRUCTOR_FLAG)) {
// try to get the constructor data
try {
final ClassData cd = ClassAnalyzer.getInstance().getClassData(
this.lookupClass(className));
result.putAll(cd.getConstructorMap());
} catch (Exception e) {
throw new NoSuchMethodException(JSONRPCResult.MSG_ERR_NOCONSTRUCTOR);
}
} else if (classData != null) {
// else it must be static
result.putAll(classData.getStaticMethodMap());
}
} else {
// else it is an object, so we can get the member methods
final ObjectInstance oi = this.resolveObject(objectID);
if (oi == null) {
throw new NoSuchMethodException();
}
ClassData cd = ClassAnalyzer.getInstance().getClassData(oi.getClazz());
result.putAll(cd.getMethodMap());
}
return result;
}