Package org.apache.flink.table.codesplit
Class ReturnValueRewriter
java.lang.Object
org.apache.flink.table.codesplit.ReturnValueRewriter
- All Implemented Interfaces:
CodeRewriter
Rewrite functions with return values by splitting them into two functions and storing the return
values into member variables.
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 Summary
Constructors -
Method Summary
-
Constructor Details
-
ReturnValueRewriter
-
-
Method Details
-
rewrite
- Specified by:
rewritein interfaceCodeRewriter
-