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 > Type mapping for reverse engineering Ada - protected type (Ada code)
  
Type mapping for reverse engineering Ada - protected type (Ada code)
For each protected type, the Reverser creates a Class in the Model.
The name of the Class is set to that of the protected type identifier.
The Class is stereotyped by the «Ada Protected Type» stereotype.
The Visibility property of the reverse engineered Class is set according to how the type is declared:
If the type is declared in the parent Ada package specification, the Visibility property is set to Public.
If the type is declared in the private region of the parent Ada package specification, the Visibility property is set to protected.
If the type is declared in the parent package body, the Visibility property is set to Private.
If the protected type has a discriminant, the Reverser creates a child Attribute that is stereotyped by the «Ada Discriminant» stereotype.
For each entry, the Reverser creates a child Operation that is stereotyped by the «Ada Entry» stereotype. The tagged value of the Ada Entry Barrier tag definition (applied by the «Ada Entry» stereotype) is set to the entry barrier text. The «Ada Entry» stereotype's other tag definitions are used to record the array of an Ada Entry that uses an array.