|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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)
IUnknownout_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 IUnknownout_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)
IUnknowniface_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 IUnknowniface_class - Class to QueryInterface to, must have a static IID field
public int Release()
IUnknown
Release in interface IUnknownpublic boolean equals(Object obj)
equals in class Objectobj - A COM interface wrapper.
objpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Objectprotected void finalize()
finalize calls it. For
apartment model interfaces finalize uses invokeAndWait to call
release on the correct apartment thread.
finalize in class Objectprotected void internalOnSetInterface()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||