@Internal public class ReturnValueRewriter extends Object implements CodeRewriter
Before
public class Example {
public int myFun(int a) {
a += 1;
return a;
}
}
<After
public class Example {
int myFunReturnValue$0;
public int myFun(int a) {
myFunImpl(a);
return myFunReturnValue$0;
}
void myFunImpl(int a) {
a += 1;
{
myFunReturnValue$0 = a;
return;
}
}
}
Constructor and Description |
---|
ReturnValueRewriter(String code,
int maxMethodLength) |
public ReturnValueRewriter(String code, int maxMethodLength)
public String rewrite()
rewrite
in interface CodeRewriter
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.