[Soot-list] How to change the return type of an method
Benedikt Lesch
solidus0815 at gmail.com
Mon May 12 09:17:53 EDT 2014
Hi,
I want to change the return value of the filereader.readline() method.
all I have is the following
@Override
protected void internalTransform(final Body b, String phaseName,
@SuppressWarnings("rawtypes") Map options) {
Iterator<Unit> iter = b.getUnits().snapshotIterator();
while (iter.hasNext()) {
Stmt s = (Stmt) iter.next();
if (s.containsInvokeExpr()) {
SootMethod method = s.getInvokeExpr().getMethod();
String declaringClass =
s.getInvokeExpr().getMethod().getDeclaringClass().getName();
if(declaringClass.equals("java.io.BufferedReader") &&
method.getName().equals("readLine")) {
//change return value
}
}
}
}
can you please tell how to change the value from here
Thanks
Benedikt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20140512/b0d62178/attachment.html
More information about the Soot-list
mailing list