/** * Set the method this instruction operates on, for methods that are * declared by the current class. * * @param name the method name * @param returnType the class of the method return type * @param param the class of the method param types * @return this instruction, for method chaining */ public MethodInstruction setMethod(String name, Class returnType, Class[] params) { BCClass owner = getCode().getMethod().getDeclarer(); String returnName = (returnType == null) ? null : returnType.getName(); String[] paramNames = null; if (params != null) { paramNames = new String[params.length]; for (int i = 0; i < params.length; i++) paramNames[i] = params[i].getName(); } return setMethod(owner.getName(), name, returnName, paramNames, false); }
/** * Set the method this instruction operates on, for methods that are * declared by the current class. * * @param name the method name * @param returnType the class of the method return type * @param param the class of the method param types * @return this instruction, for method chaining */ public MethodInstruction setMethod(String name, Class returnType, Class[] params) { BCClass owner = getCode().getMethod().getDeclarer(); String returnName = (returnType == null) ? null : returnType.getName(); String[] paramNames = null; if (params != null) { paramNames = new String[params.length]; for (int i = 0; i < params.length; i++) paramNames[i] = params[i].getName(); } return setMethod(owner.getName(), name, returnName, paramNames, false); }
/** * Set the method this instruction operates on, for methods that are * declared by the current class. * * @param name the method name * @param returnType the full class name of the method return type * @param param the full class names of the method param types * @return this instruction, for method chaining */ public MethodInstruction setMethod(String name, String returnType, String[] params) { BCClass owner = getCode().getMethod().getDeclarer(); return setMethod(owner.getName(), name, returnType, params); }
/** * Set the method this instruction operates on, for methods that are * declared by the current class. * * @param name the method name * @param returnType the full class name of the method return type * @param param the full class names of the method param types * @return this instruction, for method chaining */ public MethodInstruction setMethod(String name, String returnType, String[] params) { BCClass owner = getCode().getMethod().getDeclarer(); return setMethod(owner.getName(), name, returnType, params); }
/** * Set the method this instruction operates on, for methods that are * declared by the current class. * * @param name the method name * @param returnType the class of the method return type * @param param the class of the method param types * @return this instruction, for method chaining */ public MethodInstruction setMethod(String name, BCClass returnType, BCClass[] params) { BCClass owner = getCode().getMethod().getDeclarer(); String returnName = (returnType == null) ? null : returnType.getName(); String[] paramNames = null; if (params != null) { paramNames = new String[params.length]; for (int i = 0; i < params.length; i++) paramNames[i] = params[i].getName(); } return setMethod(owner.getName(), name, returnName, paramNames, false); }
/** * Set the method this instruction operates on, for methods that are * declared by the current class. * * @param name the method name * @param returnType the class of the method return type * @param param the class of the method param types * @return this instruction, for method chaining */ public MethodInstruction setMethod(String name, BCClass returnType, BCClass[] params) { BCClass owner = getCode().getMethod().getDeclarer(); String returnName = (returnType == null) ? null : returnType.getName(); String[] paramNames = null; if (params != null) { paramNames = new String[params.length]; for (int i = 0; i < params.length; i++) paramNames[i] = params[i].getName(); } return setMethod(owner.getName(), name, returnName, paramNames, false); }