...
The following diagram shows the relevant OpenNCP classes and the classes that are country-specific.
Injection of the National implementation classes is handled by a ServiceLoader. The ServiceLoader will locate and load a specific implementation (called a Service Provider) of an interface. The ServiceLoader is included in Java SE6 and is already utilized in OpenNCP.
Here is an example that shows the ServiceLoader in action. Here you can see how an implementation of the PatientSearchInterface is loaded.
...