private static ValueType[] getStaticSignature(MethodReference method) { ValueType[] signature = method.getSignature(); ValueType[] staticSignature = new ValueType[signature.length + 1]; for (int i = 0; i < signature.length; ++i) { staticSignature[i + 1] = signature[i]; } staticSignature[0] = ValueType.object(method.getClassName()); return staticSignature; }
@Override public void visit(InvokeInstruction insn) { String className = classNameMapper.map(insn.getMethod().getClassName()); ValueType[] signature = insn.getMethod().getSignature(); boolean changed = true; for (int i = 0; i < signature.length; ++i) { ValueType type = signature[i]; ValueType newType = rename(type); if (newType != null) { changed = true; } signature[i] = newType; } if (changed) { insn.setMethod(referenceCache.getCached(new MethodReference(className, new MethodDescriptor(insn.getMethod().getName(), signature)))); } }
private static ValueType[] getStaticSignature(MethodReference method) { ValueType[] signature = method.getSignature(); ValueType[] staticSignature = new ValueType[signature.length + 1]; for (int i = 0; i < signature.length; ++i) { staticSignature[i + 1] = signature[i]; } staticSignature[0] = ValueType.object(method.getClassName()); return staticSignature; }
@Override public void visit(InvokeInstruction insn) { String className = classNameMapper.map(insn.getMethod().getClassName()); ValueType[] signature = insn.getMethod().getSignature(); for (int i = 0; i < signature.length; ++i) { signature[i] = rename(signature[i]); } insn.setMethod(new MethodReference(className, new MethodDescriptor(insn.getMethod().getName(), signature))); }