![]() |
|||||
|
How to create an instance?As with typed programming, JMI class proxy objects are used to create instance level objects. The class proxy objects provide factory operations that allow the clients to create instance level objects. In order to create an instance, the corresponding class proxy object must be retrieved. For this purpose the package object that contains the desired class proxy object must retrieved first. For more information about how to retrieve the package objects, please refer to How to retrieve a package?. Use the refClass operation provided by the package (in the lab example: lab1Pkg) to access the desired class proxy object. This class proxy object can then be used to create instance level objects with the refCreateInstance() operation. The following example illustrates how to retrieve a class proxy object and how to create an instance level object. |
||||