public class JsFunctionClusterer extends JsAbstractTextTransformer
js, originalStatementRanges, sourceInfoMap, statementRanges
Constructor and Description |
---|
JsFunctionClusterer(JsAbstractTextTransformer xformer) |
JsFunctionClusterer(String js,
StatementRanges statementRanges,
Map<Range,SourceInfo> sourceInfoMap) |
Modifier and Type | Method and Description |
---|---|
protected void |
endStatements(StringBuilder newJs,
ArrayList<Integer> starts,
ArrayList<Integer> ends)
Called if any operations need to be performed after all statements have
been processed.
|
void |
exec() |
int[] |
getReorderedIndices()
Returns the array of reordered statement indices after clustering.
|
protected void |
updateSourceInfoMap()
Fixes the index ranges of individual expressions in the generated
JS after function clustering has reordered statements.
|
addStatement, beginStatement, beginStatements, endStatement, getJs, getJsForRange, getSourceInfoMap, getStatementRanges, recomputeJsAndStatementRanges
public JsFunctionClusterer(JsAbstractTextTransformer xformer)
public JsFunctionClusterer(String js, StatementRanges statementRanges, Map<Range,SourceInfo> sourceInfoMap)
public void exec()
exec
in class JsAbstractTextTransformer
public int[] getReorderedIndices()
protected void endStatements(StringBuilder newJs, ArrayList<Integer> starts, ArrayList<Integer> ends)
JsAbstractTextTransformer
endStatements
in class JsAbstractTextTransformer
protected void updateSourceInfoMap()
updateSourceInfoMap
in class JsAbstractTextTransformer
Copyright © 2018. All rights reserved.