/** * Return the declaring type of the method this instruction operates on, * or null if not set. */ public Class getMethodDeclarerType() { String type = getMethodDeclarerName(); if (type == null) return null; return Strings.toClass(type, getClassLoader()); }
/** * Return the declaring type of the method this instruction operates on, * or null if not set. */ public Class getMethodDeclarerType() { String type = getMethodDeclarerName(); if (type == null) return null; return Strings.toClass(type, getClassLoader()); }
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()); }
/** * Return the declaring type of the method this instruction operates on, * or null if not set. */ public BCClass getMethodDeclarerBC() { String type = getMethodDeclarerName(); if (type == null) return null; return getProject().loadClass(type, getClassLoader()); }
/** * 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()); }
/** * Return the declaring type of the method this instruction operates on, * or null if not set. */ public BCClass getMethodDeclarerBC() { String type = getMethodDeclarerName(); if (type == null) return null; return getProject().loadClass(type, getClassLoader()); }
/** * Set the name of the method this instruction operates on. * * @return this instruction, for method chaining */ public MethodInstruction setMethodName(String name) { return setMethod(getMethodDeclarerName(), name, getMethodReturnName(), getMethodParamNames()); }
/** * Set the name of the method this instruction operates on. * * @return this instruction, for method chaining */ public MethodInstruction setMethodName(String name) { return setMethod(getMethodDeclarerName(), name, 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); }
return false; s1 = getMethodDeclarerName(); s2 = ins.getMethodDeclarerName(); if (!(s1 == null || s2 == null || s1.equals(s2))) return false;
return false; s1 = getMethodDeclarerName(); s2 = ins.getMethodDeclarerName(); 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]; }