public void visitInvokeInstruction(InvokeInstruction i) { short opcode = i.getOpcode(); String class_name = i.getClassName(_cp); String method_name = i.getMethodName(_cp); Type type = i.getReturnType(_cp); Type[] arg_types = i.getArgumentTypes(_cp); _out.println("il.append(_factory.createInvoke(\"" + class_name + "\", \"" + method_name + "\", " + BCELifier.printType(type) + ", " + BCELifier.printArgumentTypes(arg_types) + ", " + "Constants." + Constants.OPCODE_NAMES[opcode].toUpperCase() + "));"); }
@Override public void visitInvokeInstruction( final InvokeInstruction i ) { final short opcode = i.getOpcode(); final String class_name = i.getClassName(_cp); final String method_name = i.getMethodName(_cp); final Type type = i.getReturnType(_cp); final Type[] arg_types = i.getArgumentTypes(_cp); _out.println("il.append(_factory.createInvoke(\"" + class_name + "\", \"" + method_name + "\", " + BCELifier.printType(type) + ", " + BCELifier.printArgumentTypes(arg_types) + ", " + CONSTANT_PREFIX + Const.getOpcodeName(opcode).toUpperCase(Locale.ENGLISH) + "));"); }
Type[] argumentTypes = ii.getArgumentTypes(cpg); Method method = findMethod(referencedJavaClass, methodName, argumentTypes);
final InvokeInstruction invoke = (InvokeInstruction) instructions[i]; try { field = T.getField(invoke.getReferenceType(constantPoolGen), invoke.getMethodName(constantPoolGen), invoke.getReturnType(constantPoolGen), invoke.getArgumentTypes(constantPoolGen)); } catch (ClassNotFoundException e) { throw new RuntimeReflectionException(e);
Type[] argumentTypes = ii.getArgumentTypes(cpg); Method method = findMethod(referencedJavaClass, methodName, argumentTypes);
/** * Looks for the method referenced by the given invoke instruction in the given class. * @param jc the class that defines the referenced method * @param invoke the instruction that references the method * @return the referenced method or null if not found. */ private Method getMethod(final JavaClass jc, final InvokeInstruction invoke) { final Method[] ms = jc.getMethods(); for (final Method element : ms) { if ( (element.getName().equals(invoke.getMethodName(cpg))) && (Type.getReturnType(element.getSignature()).equals(invoke.getReturnType(cpg))) && (objarrayequals(Type.getArgumentTypes(element.getSignature()), invoke.getArgumentTypes(cpg))) ) { return element; } } return null; }
if (allDatabasePasswordMethods.containsKey(md)) { for(int paramNumber : allDatabasePasswordMethods.get(md)) { Constant operandValue = frame.getStackValue(iins.getArgumentTypes(cpg).length-1-paramNumber); if (operandValue.isConstantString()) { String password = operandValue.getConstantString(); Constant operandValue = frame.getStackValue(iins.getArgumentTypes(cpg).length-1-paramNumber); if (!operandValue.isConstantString()) { continue;
final Type[] ts = o.getArgumentTypes(cpg); for (final Type element : ts) { t = element;
Type[] ts = o.getArgumentTypes(cpg); for (int i=0; i<ts.length; i++){ t = ts[i];