Attempts to return the message class corresponding to the given name, by
searching through default and user-defined (as per packageList()) packages.
Returns GenericMessage if the class is not found.
It is important to note that there can only be one implementation of a particular message
structure (i.e. one class with the message structure name, regardless of its package) among
the packages defined as per the packageList()
method. If there are duplicates
(e.g. two ADT_A01 classes) the first one in the search order will always be used. However,
this restriction only applies to message classes, not (normally) segment classes, etc. This is because
classes representing parts of a message are referenced explicitly in the code for the message
class, rather than being looked up (using findMessageClass() ) based on the String value of MSH-9.
The exception is that Segments may have to be looked up by name when they appear
in unexpected locations (e.g. by local extension) -- see findSegmentClass().
Note: the current implementation will be slow if there are multiple user-
defined packages, because the JVM will try to load a number of non-existent
classes every parse. This should be changed so that specific classes, rather
than packages, are registered by name.