org.jmlspecs.jml4.rac
Class AstMerger

java.lang.Object
  extended by org.jmlspecs.jml4.rac.AstMerger

public class AstMerger
extends java.lang.Object

Merges two compilation unit ASTs. This class merges two compilation units by combining their elements such as package statements, import statements, and type declarations. This is used for merging a RAC code AST to its source or original AST.

Author:
Amritam Sarcar and Yoonsik Cheon

Constructor Summary
AstMerger(CompilationUnitDeclaration fromCU, CompilationUnitDeclaration toCU)
          Creates a new merger that merges the given fromCU to toCU.
 
Method Summary
 void merge()
          Merges the stored RAC code AST to its source code AST.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AstMerger

public AstMerger(CompilationUnitDeclaration fromCU,
                 CompilationUnitDeclaration toCU)
Creates a new merger that merges the given fromCU to toCU. The compilation unit fromCU is assumed to represent RAC code for the source code represented by the compilation unit toCU.

Method Detail

merge

public void merge()
Merges the stored RAC code AST to its source code AST.