public void addMethod(string name, string returnType, int visitType, bool needBaseCall, params string[] args) { if (returnType == null) { returnType = ""; } ILMethodInfo m = new ILMethodInfo(); m.name = name; m.returnType = returnType; m.visitType = visitType; m.needBaseCall = needBaseCall; if (args.Length > 0) { MethodArgInfo argInfo; for (int i = 0; i < args.Length; i += 2) { argInfo = new MethodArgInfo(); argInfo.type = args[i]; //先类型 argInfo.name = args[i + 1]; //再名字 m.args.add(argInfo); } } toAddMethod(m); }
/** 执行添加方法 */ public void toAddMethod(ILMethodInfo method) { string key = method.getKey(); //不重复添加 if (methodKeys.contains(key)) { return; } methods.add(method); methodKeys.put(key, method); }