The following diagram shows the architecture of the Migration Tool:
The IOC (Inversion of Control) function is provided by the BTT ElementFactory. It is used to convert the external configurations into runtime data. In the migration tool, IOC is responsible for creating specific Translators and reading the Rule Set into runtime. For more information, see ElementFactory.
Specific Translator is used to migrate a certain type of input file or code pieces that need to be migrated. All these Translators implement a single interface. Each Translator has its own Rule Set. How to parse these rules and how to do the migration depend on the Translators. In this Rule-based Migration Tool, command-chain mode is supported, which means that each type of input code piece or file can have a series of Translators, and these Translators can perform the migration action one by one.
The translate manager is responsible for initializing and managing different types of Translators. After the Translators initialize, the Translate Manager registers the Translators according to their types. When executing the migration action, the Translate Manager gets the needed Translators according to different input types from the Translate Engine.
The core of the Migration Tool is the Translate Engine. It gets the input files that need to be migrated and then fetches the needed Translator from Translate Manager to do the migration. Finally, it outputs the migrated files or code pieces and generates the migration report and the migration recommendations.