How Java names are aliased

When you give a part a name, that name must be a valid Java identifier, except that you can use a hyphen or minus sign (-) in a part name. However, a hyphen cannot be the first character in a part name.

If you choose a name that is a Java keyword or a name that contains a dollar sign ($) or a hyphen or minus, the part name will not match the name in the generated output. An aliasing mechanism automatically appends a dollar sign to each part name that is a Java keyword. If you specify a name that contains one or more dollar signs or hyphens, the aliasing mechanism replaces each symbol with a Unicode value as follows:

$ $0024
- $002d

For example, an item named class is aliased to class$, and an item named class$ is aliased to class$0024.

The case you use to declare a part name is preserved. Programs XYZ and xyz are generated in XYZ.java and xyz.java respectively. On Windows 2000/NT/XP, if you generate into the same directory parts with names that differ only in case, the older files are overwritten.

EGL package names are always converted to lower case Java package names.

Finally, if the name of a program, page handler, or library matches the name of a class from the Java system package java.lang, a dollar sign is appended to the class name: Object becomes Object$, Error becomes Error$, and so on.

For details on how EGL creates Java identifiers in JSP files and in the Java bean that is derived from a page handler, see Changes to EGL identifiers in JSP files and generated Java beans.

Related concepts
Name aliasing

Related reference
Changes to EGL identifiers in JSP files and generated Java beans

How names are aliased