Integrations (PTC products, 3rd party products and code) > Code integration (Ada, ARINC 653, C, C#, C++, IDL, Java, SQL and VB) > Ada Code > Reverse engineering legacy Ada code > Mapping information for Reverse engineering Ada > Renames mapping for reverse engineering Ada (Ada code)
  
Renames mapping for reverse engineering Ada (Ada code)
A renames declaration can rename a package, subprogram, object or exception.
The Visibility property of the Modeler item created for the renames declaration is set according to how the renames declaration is declared:
If the renames declaration is declared in the Ada package specification outside the private region, the Visibility property is set to Public.
If the renames declaration is declared in the Ada package specification within the private region, the Visibility property is set to Protected.
If the renames declaration is declared in the Ada package body, the Visibility property is set to Private.
For each renames declaration that renames an Ada package:
The Reverser creates a Package or Class for the renames declaration, depending on whether the Ada package that is renamed by the renames declaration was reverse engineered as a Package or a Class. The name of the new Package is as specified by the renames declaration, and the Package or Class is created as a child of the Package or Class created for the parent Ada package.
The new Package or Class is stereotyped by the «Ada Renames» stereotype:
If the Reverser can find the target Package or Class in the Model, the Package or Class that is renamed by the renames declaration is referenced through the tagged value of the Ada Rename Target tag definition (applied by the «Ada Renames» stereotype).
If the Reverser cannot find the target Package or Class in the Model, the tagged value of the Ada Rename Target Text tag definition (applied by the «Ada Renames» stereotype) is set to the name of the Ada package that is renamed by the renames declaration.
For each renames declaration that renames a subprogram:
The Reverser creates an Operation for the renames declaration. The name of the new Operation is as specified by the renames declaration, and the Operation is created in the Package or Class created for the parent Ada package.
The new Operation is stereotyped by the «Ada Renames» stereotype:
If the Reverser can find the target Operation in the Model, the Operation that is renamed by the renames declaration is referenced through the tagged value of the Ada Rename Target tag definition (applied by the «Ada Renames» stereotype).
If the Reverser cannot find the target Operation in the Model, the tagged value of the Ada Rename Target Text tag definition (applied by the «Ada Renames» stereotype) is set to the name of the subprogram that is renamed by the renames declaration.
For each renames declaration that renames a constant or variable:
The Reverser creates an Attribute for the renames declaration. The name of the new Attribute is as specified by the renames declaration, and the Attribute is created in the Package or Class created for the parent Ada package.
The new Attribute is stereotyped by the «Ada Renames» stereotype:
If the Reverser can find the target Attribute in the Model, the Attribute that is renamed by the renames declaration is referenced through the tagged value of the Ada Rename Target tag definition (applied by the «Ada Renames» stereotype).
If the Reverser cannot find the target Package or Class in the Model, the tagged value of the Ada Rename Target Text tag definition (applied by the «Ada Renames» stereotype) is set to the name of the constant or variable that is renamed by the renames declaration.
For each renames declaration that renames an exception:
The Reverser creates an Exception for the renames declaration. The name of the new Exception is as specified by the renames declaration, and the Exception is created in the Package created for the parent Ada package.
* 
If the parent Ada package is reverse engineered as a Class, the renames declaration for the exception is not reverse engineered and a warning is recorded in the log. This cannot happen when reverse engineering into an empty model.
The new Exception is stereotyped by the «Ada Renames» stereotype:
If the Reverser can find the target Exception in the Model, the Exception that is renamed by the renames declaration is referenced through the tagged value of the Ada Rename Target tag definition (applied by the «Ada Renames» stereotype).
If the Reverser cannot find the target Exception in the Model, the tagged value of the Ada Rename Target Text tag definition (applied by the «Ada Renames» stereotype) is set to the name of the exception that is renamed by the renames declaration.