/** * Set the method this instruction operates on. * * @return this instruction, for method chaining */ public MethodInstruction setMethod(Method method) { if (method == null) return setMethodIndex(0); return setMethod(method.getDeclaringClass(), method.getName(), method.getReturnType(), method.getParameterTypes()); }
/** * Set the method this instruction operates on. * * @return this instruction, for method chaining */ public MethodInstruction setMethod(Method method) { if (method == null) return setMethodIndex(0); return setMethod(method.getDeclaringClass(), method.getName(), method.getReturnType(), method.getParameterTypes()); }
/** * Set the method this instruction operates on. * * @return this instruction, for method chaining */ public MethodInstruction setMethod(Constructor method) { if (method == null) return setMethodIndex(0); setOpcode(Constants.INVOKESPECIAL); return setMethod(method.getDeclaringClass(), "<init>", void.class, method.getParameterTypes()); }
/** * Set the method this instruction operates on. * * @return this instruction, for method chaining */ public MethodInstruction setMethod(Constructor method) { if (method == null) return setMethodIndex(0); setOpcode(Constants.INVOKESPECIAL); return setMethod(method.getDeclaringClass(), "<init>", void.class, method.getParameterTypes()); }
if (name == null && returnType == null && dec == null && (params == null || params.length == 0)) return setMethodIndex(0); return setMethodIndex(getPool().findInterfaceMethodEntry(dec, name, desc, true)); if (getOpcode() == Constants.INVOKEDYNAMIC) { int bootstrapindex = Integer.parseInt(dec); // Dec represents the bootstrap index return setMethodIndex(getPool().findInvokeDynamicEntry(bootstrapindex, name, desc, true)); return setMethodIndex(getPool().findMethodEntry(dec, name, desc, true));
if (name == null && returnType == null && dec == null && (params == null || params.length == 0)) return setMethodIndex(0); return setMethodIndex(getPool().findInterfaceMethodEntry(dec, name, desc, true)); if (getOpcode() == Constants.INVOKEDYNAMIC) { int bootstrapindex = Integer.parseInt(dec); // Dec represents the bootstrap index return setMethodIndex(getPool().findInvokeDynamicEntry(bootstrapindex, name, desc, true)); return setMethodIndex(getPool().findMethodEntry(dec, name, desc, true));
/** * Set the method this instruction operates on. * * @return this instruction, for method chaining */ public MethodInstruction setMethod(BCMethod method) { if (method == null) return setMethodIndex(0); return setMethod(method.getDeclarer().getName(), method.getName(), method.getReturnName(), method.getParamNames(), false); }
/** * Set the method this instruction operates on. * * @return this instruction, for method chaining */ public MethodInstruction setMethod(BCMethod method) { if (method == null) return setMethodIndex(0); return setMethod(method.getDeclarer().getName(), method.getName(), method.getReturnName(), method.getParamNames(), false); }