|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.moesol.bindings.platform_sdk.component_services.IUnknown.Jni
public static class IUnknown.Jni
Java to COM implementation.
Nested Class Summary | |
---|---|
static class |
IUnknown.Jni.MoeSolInternal
Help prevent method/property name collisions. |
Nested classes/interfaces inherited from interface com.moesol.bindings.platform_sdk.component_services.IUnknown |
---|
IUnknown.Disp, IUnknown.Jni |
Field Summary |
---|
Fields inherited from interface com.moesol.bindings.platform_sdk.component_services.IUnknown |
---|
IID, TYPELIB |
Constructor Summary | |
---|---|
protected |
IUnknown.Jni()
You cannot create an interface from thin air so protect default ctor. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
Uses the COM property that if you QueryInterface to two interface pointers to IUnknown the pointers returned will be equals if and only if the interfaces refer to the same object. |
protected void |
finalize()
If Release has not been called, finalize calls it. |
int |
hashCode()
|
protected void |
internalOnSetInterface()
Template method to setup apartment thread checking. |
IUnknown |
QueryInterface(Class iface_class)
Call IUnknown::QueryInterface on the native COM pointer. |
void |
QueryInterface(Object[] out_iface)
Call IUnknown::QueryInterface on the native COM pointer. |
int |
Release()
Calls the native COM interfaces IUnknown::Release method and make this equivalent to NULL. |
String |
toString()
The returned string includes the class name and the hexadecimal representation of the underlying native COM pointer. |
Methods inherited from class java.lang.Object |
---|
clone, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected IUnknown.Jni()
Method Detail |
---|
public void QueryInterface(Object[] out_iface)
IUnknown
out_iface
, so you should
pass in an array of the type of interface you want. For example,
IUnknown unknown = an_unknown_argument; IFooInterface[] out_foo_interface = { null }; unknown.QueryInterface(out_foo_interface); try { out_foo_interface[0].BarMethodOnFoo(); } finally { out_foo_interface[0].Release(); out_foo_interface[0] = null; }
QueryInterface
in interface IUnknown
out_iface
- Object array of size one to receive the new interface. The
result of the QueryInterface is placed in out_iface[0[public IUnknown QueryInterface(Class iface_class)
IUnknown
iface_class
.
IUnknown unknown = an_unknown_argument; IFooInterface foo_interface = null; foo_interface = (IFooInterface) unknown.QueryInterface(IFooInterface.class); try { foo_interface.BarMethodOnFoo(); } finally { foo_interface.Release(); }
QueryInterface
in interface IUnknown
iface_class
- Class to QueryInterface to, must have a static IID field
public int Release()
IUnknown
Release
in interface IUnknown
public boolean equals(Object obj)
equals
in class Object
obj
- A COM interface wrapper.
obj
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
protected void finalize()
finalize
calls it. For
apartment model interfaces finalize uses invokeAndWait to call
release on the correct apartment thread.
finalize
in class Object
protected void internalOnSetInterface()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |