private static class FunctionRewriter.ReturnConstantReducer extends FunctionRewriter.SingleReturnStatementReducer
| Modifier and Type | Field and Description |
|---|---|
(package private) static java.lang.String |
FACTORY_METHOD_NAME |
(package private) static java.lang.String |
HELPER_SOURCE |
| Modifier | Constructor and Description |
|---|---|
private |
ReturnConstantReducer() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getHelperSource() |
private Node |
getValueNode(Node functionNode)
Checks if the function matches the pattern:
function(
|
Node |
reduce(Node node) |
maybeGetSingleReturnRValuebuildCallNodestatic final java.lang.String FACTORY_METHOD_NAME
static final java.lang.String HELPER_SOURCE
public java.lang.String getHelperSource()
getHelperSource in class FunctionRewriter.Reducerpublic Node reduce(Node node)
reduce in class FunctionRewriter.Reducer