public void enterMethodInstruction(MethodInstruction obj) { _out.print(obj.getMethodIndex() + " <" + obj.getMethodReturnName() + " " + obj.getMethodDeclarerName() + "." + obj.getMethodName() + "("); String[] params = obj.getMethodParamNames(); int dotIndex; for (int i = 0; i < params.length; i++) { dotIndex = params[i].lastIndexOf('.'); if (dotIndex != -1) params[i] = params[i].substring(dotIndex + 1); _out.print(params[i]); if (i != (params.length - 1)) _out.print(", "); } _out.print(")>"); }
public void enterMethodInstruction(MethodInstruction obj) { _out.print(obj.getMethodIndex() + " <" + obj.getMethodReturnName() + " " + obj.getMethodDeclarerName() + "." + obj.getMethodName() + "("); String[] params = obj.getMethodParamNames(); int dotIndex; for (int i = 0; i < params.length; i++) { dotIndex = params[i].lastIndexOf('.'); if (dotIndex != -1) params[i] = params[i].substring(dotIndex + 1); _out.print(params[i]); if (i != (params.length - 1)) _out.print(", "); } _out.print(")>"); }
/** * Set the return type of the method this instruction operates on. * * @return this instruction, for method chaining */ public MethodInstruction setMethodReturn(String type) { return setMethod(getMethodDeclarerName(), getMethodName(), type, getMethodParamNames()); }
/** * Set the declaring type of the method this instruction operates on. * * @return this instruction, for method chaining */ public MethodInstruction setMethodDeclarer(String type) { return setMethod(type, getMethodName(), getMethodReturnName(), getMethodParamNames()); }
/** * Set the declaring type of the method this instruction operates on. * * @return this instruction, for method chaining */ public MethodInstruction setMethodDeclarer(String type) { return setMethod(type, getMethodName(), getMethodReturnName(), getMethodParamNames()); }
/** * Set the param types of the method this instruction operates on. * * @return this instruction, for method chaining */ public MethodInstruction setMethodParams(String[] types) { return setMethod(getMethodDeclarerName(), getMethodName(), getMethodReturnName(), types); }
/** * Set the param types of the method this instruction operates on. * * @return this instruction, for method chaining */ public MethodInstruction setMethodParams(String[] types) { return setMethod(getMethodDeclarerName(), getMethodName(), getMethodReturnName(), types); }
/** * Set the return type of the method this instruction operates on. * * @return this instruction, for method chaining */ public MethodInstruction setMethodReturn(String type) { return setMethod(getMethodDeclarerName(), getMethodName(), type, getMethodParamNames()); }
String s1 = getMethodName(); String s2 = ins.getMethodName(); if (!(s1 == null || s2 == null || s1.equals(s2))) return false;
String s1 = getMethodName(); String s2 = ins.getMethodName(); if (!(s1 == null || s2 == null || s1.equals(s2))) return false;
void read(Instruction orig) { super.read(orig); MethodInstruction ins = (MethodInstruction) orig; setMethod(ins.getMethodDeclarerName(), ins.getMethodName(), ins.getMethodReturnName(), ins.getMethodParamNames()); }
void read(Instruction orig) { super.read(orig); MethodInstruction ins = (MethodInstruction) orig; setMethod(ins.getMethodDeclarerName(), ins.getMethodName(), ins.getMethodReturnName(), ins.getMethodParamNames()); }
/** * Return the method this instruction operates on, or null if not set. */ public BCMethod getMethod() { String dec = getMethodDeclarerName(); if (dec == null) return null; BCClass bc = getProject().loadClass(dec, getClassLoader()); BCMethod[] meths = bc.getMethods(getMethodName(),getMethodParamNames()); if (meths.length == 0) return null; return meths[0]; }
/** * Return the method this instruction operates on, or null if not set. */ public BCMethod getMethod() { String dec = getMethodDeclarerName(); if (dec == null) return null; BCClass bc = getProject().loadClass(dec, getClassLoader()); BCMethod[] meths = bc.getMethods(getMethodName(),getMethodParamNames()); if (meths.length == 0) return null; return meths[0]; }