The EGL generator applies the following rules to alias Java™ wrapper names:
In addition, special rules apply to Java wrapper class names for program wrappers, record wrappers, and substructured array items. The remaining sections discuss these rules and give an example. In general, if naming conflicts exist between fields within a generated wrapper class, the qualified name is used to determine the class and variable names. If the conflict is still not resolved, an exception is thrown at generation time.
Record parameter wrappers are named by using the above rules applied to the type definition name. If the record wrapper class name conflicts with the program class name or the program wrapper class name, Record is added at the end of the record wrapper class name.
The following sample program and generated output show what should be expected during wrapper generation:
Program WrapperAlias(param1 RecordA) end Record RecordA type basicRecord 10 itemA CHAR(10)[1]; 10 item_b CHAR(10)[1]; 10 item$C CHAR(10)[1]; 10 static CHAR(10)[1]; 10 itemC CHAR(20)[1]; 15 item CHAR(10)[1]; 15 itemD CHAR(10)[1]; 10 arrayItem CHAR(20)[5]; 15 innerItem1 CHAR(10)[1]; 15 innerItem2 CHAR(10)[1]; end
Output | Name |
---|---|
Program wrapper class | WrapperaliasWrapper, containing a field param1, which is an instance of the record wrapper class RecordA |
Parameter wrapper classes | RecordA, accessible through
the following methods:
|
Related concepts
Compatibility with VisualAge Generator
Java wrapper
Name aliasing
Related tasks
Generating Java wrappers
Related reference
Java wrapper classes
Naming conventions
Output of Java wrapper generation