Package com.vaadin.copilot.javarewriter
Class JavaRewriterMerger
java.lang.Object
com.vaadin.copilot.javarewriter.JavaRewriterMerger
Handles merging of the original source file with changes perform to the AST.
Outputs the original parts of the source file as they were and tries it best
to make the new changes fit in.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
JavaRewriterMerger
public JavaRewriterMerger()
-
-
Method Details
-
apply
public static String apply(Set<com.github.javaparser.ast.Node> addedOrModifiedNodes, Set<com.github.javaparser.Range> removedRanges, String source) Applies the given changes to the given source and returns the result.- Parameters:
addedOrModifiedNodes
- the nodes that have been added or modified and need to be written to the fileremovedRanges
- the ranges that have been removed from the original sourcesource
- the original source
-