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) > Basic type mapping for Java (Java code)
  
Basic type mapping for Java (Java code)
The mapping of basic types is defined through the [Datatype Mappings] section of the JavaGen.ini file, which resides in the 'PTC Integrity Modeler\Modeler\System\JavaGen' folder. If you create a basic type in the Model, you may have to map it to a Java type in the JavaGen.ini file:
If the Basic Type name does not contain spaces and its case is as you want it generated, you do not have to map the Basic Type to a Java type.
If the Basic Type name needs to be generated as a different type, you must map the Basic Type to a Java type. For example, Date=long.
If the Basic Type name contains spaces, you must map the Basic Type to a Java type. You can map a Basic Type name to itself, for example, my type=my type. Failure to do so results in spaces being generated as underscores. If you then reverse engineer the code, the data type will be changed to an uninterpreted data type in the Model that contains underscores instead of spaces.
If the Basic Type name has the wrong case, you must map the Basic Type to a Java type with the correct case specified. For example, Short=short.
JavaGen.ini is installed with the following data type mappings defined (the Basic Type name to the left of the equals sign is not case sensitive, the Java name to the right of the equals sign is case sensitive):
any=int
boolean=boolean
Boolean=boolean
byte=byte
char=char
Date=long
double=double
float=float
int=int
Integer=int
long=long
octet=int
short=short
String=String
UnlimitedNatural=int
unsigned long=long
unsigned short=int
void=void
If a data type is not defined, ACS uses the default specified in the [Datatype Default] section of the JavaGen.ini file.