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 fields. 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 fieldA CHAR(10)[1];
10 field_b CHAR(10)[1];
10 field$C CHAR(10)[1];
10 static CHAR(10)[1];
10 fieldC CHAR(20)[1];
15 field CHAR(10)[1];
15 fieldD CHAR(10)[1];
10 arrayField CHAR(20)[5];
15 innerField1 CHAR(10)[1];
15 innerField2 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:
|