Integrations (PTC products, 3rd party products and code) > Code integration (Ada, ARINC 653, C, C#, C++, IDL, Java, SQL and VB) > Java code > Reverse engineering legacy Java code > Mapping information > Mapping information (excluding state diagrams) > Data type mapping for Java (Java code)
  
Data type mapping for Java (Java code)
For each Data Type, ACS generates a class in a file of the same name.
The generation of a Data Type is derived from the items it owns, properties of the Data Type, and the tagged values set for Tag Definitions applied by the «Java Class» stereotype.
Child items:
If the Data Type owns Attributes, ACS generates attributes within the class code. For Attribute mapping information, click here Attribute mapping for Java (Java code)
If the Data Type owns Dependencies, ACS generates import or implements statements in the code. For Dependency mapping information, click here Dependency mapping for Java (Java code)
If the Data Type owns Generalizations that define inheritance, ACS generates the Generalizations as extends or implements statements. For Generalization mapping information, click here Generalization mapping for Java (Java code)
If the Data Type owns Roles, ACS generates the Roles as attributes within the code. For Role mapping information, click here Association and role mapping for Java (Java code)
Properties:
If the Abstract property is set to true (Abstract check box selected on Property Pages), ACS generates the class as abstract.
If the Description property has a value, ACS generates the Description as a comment on the line before the class declaration.
The Description property is also generated as a file comment if the «Java Class» stereotype is not applied to the Data Type
The Formal Template Parameters are generated as the parameters of a Data Type set up as a Java Generic through its Template property.
The Name property is generated as the name of the Java file and as the name of the Java class in that file.
* 
ACS may modify the class name that is added to the code to make it valid for Java. You can specify the exact class name to add to the code through the CODE_GENERATION_NAME property of a Data Type. Tell me more...
The Persistent property is ignored.
If the Template property is set
The Structure property is ignored.
If the Template property is set to TRUE (Template check box selected on Property Pages), the Data Type is generated as a Java generic.
The Template Specialization property (and any Template Specialization Parameters) is ignored.
The Union property is ignored.
The Visibility property is generated as follows:
For non-nested Data Types, ACS ignores the Visibility. Non-nested Data Types are generated as Public, unless the tagged value of the Java Default Access tag definition is set to TRUE.
For nested Data Types, the Data Type is generated as either Public, Private or Protected, unless the tagged value of the Java Default Access tag definition is set to TRUE. If the tagged value of the Java Default Access tag definition is set to TRUE, the Visibility property is ignored.
Tag Definitions:
If the «Java Module» stereotype is applied to the Data Type, ACS generates a Java file for the Data Type, but the Data Type is not defined as a Java class in that file.
The following Tag Definitions are applied to a Data Type by the «Java Class» stereotype:
If the tagged value of the Java Default Access tag definition is set to TRUE, ACS generates the Java class with no access specifier.
If the tagged value of the
Java Extends Text tag definition has been set, the value is generated as the extends statements for the Java class.
If the tagged value of the
Java File tag definition has been set, the value is used when opening an associated Java file from Modeler. This value is set by ACS.
If the tagged value of the Java File Comment tag definition has been set, ACS generates the value at the top of the Java file.
If the tagged value of the Java Final tag definition is set to TRUE, ACS generates the Java class as final.
If the tagged value of the Java Is Static tag definition is set to TRUE, ACS generates the class as static.
If for a nested Data Type the tagged value of the Java Non Member tag definition is set to TRUE, ACS generates the class construct outside of the class or interface construct created for the parent item (class constructs for nested Data Types are generated in the Java file created for the parent item).
If the tagged value of the Java Implements Text tag definition has been set, the value is generated as the implements statement for the Java class.
If the tagged value of the Java Import Text tag definition has been set, the value is generated as import statements for the Java class.