Overview of COM Attributes for Java Class Files |
![]() Previous |
![]() Introduction |
![]() Index |
![]() Next |
Java-callable wrappers (JCWs) for Component Object Model (COM) objects and proxies may contain Java-implemented methods, but no fields (other than those mapped to the underlying COM object) or any other dynamic state, because there is no way to specify a constructor to be called at marshaling time.
JCWs for COM objects will behave as expected with regard to the "==" operator. That is, "==" will yield a true value if and only if the underlying COM objects have the same IUnknown interface pointer.
The "==" operator will not be maintained for Java-callable data wrappers (data proxies). The cost of maintaining identity for data proxies (many of which will be temporary stack-allocated arguments) is too high and data proxies are already non-Java-like, in that their useful lifetimes are determined externally rather than by garbage collection.
© 1997 Microsoft Corporation. All rights reserved. Legal Notices.