Special macros are used to map the schema object names to legal Java-compliant
names (a process known as name mangling). These macros are appropriately modified
automatically when a schema object name is changed. There are two types
of special macros.
The first macro is used to refer to the JPO name in the Java
class definition. In this case the macro is
${CLASSNAME}
A similar macro is also used to refer to other JPO classes
inside the code of a JPO, for example when extending a base class or
calling a method in another JPO. In these cases the macro is
${CLASS:jpo_name}
where jpo_name is the name of the JPO
holding the class of interest. Use of these parameterized class names
allows both dynamic loading of classes after the source has been changed
without restarting the system, and automatic generation of dependencies between multiple Java
Program Objects.
For example, if there is JPO named "emxRADProject" and its corresponding
Business Type RADProject derives from Project (which has a corresponding
JPO named "emxProject"), then the Java code defining the class for RADProject
would look something like:
public class ${CLASSNAME} extends ${CLASS:emxProject}
{
:
}
During compilation (and extraction), the macro ${CLASSNAME}
is mangled into a name that includes the JPO name "emxRADProject" (plus
a suffix of "_mxJPO" followed by a hashed encoding) and the macro ${CLASS:emxProject}
is mangled into the exact same name as it was for ${CLASSNAME}
appearing in the emxProject JPO. In other words, the system does all
the appropriate name mangling and the JPO programmer need only be concerned
with the higher-level macros.
For example, the "Hello World" JPO ends up with a class name something
like Hello_World_mxJPOtAXMTwEAAAAFAAAA (the hashed encoding
at the end will vary).