Class ObjectFactory
- java.lang.Object
- 
- com.sun.jna.platform.win32.COM.util.ObjectFactory
 
- 
- Direct Known Subclasses:
- Factory
 
 public class ObjectFactory extends java.lang.ObjectFactory keeps track of COM objects - all objects created with this factory can be disposed by callingdisposeAll().
- 
- 
Constructor SummaryConstructors Constructor Description ObjectFactory()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) IDispatchCallbackcreateDispatchCallback(java.lang.Class<?> comEventCallbackInterface, IComEventCallbackListener comEventCallbackListener)<T> TcreateObject(java.lang.Class<T> comInterface)Creates a new COM object (CoCreateInstance) for the given progId and returns a ProxyObject for the given interface.<T> TcreateProxy(java.lang.Class<T> comInterface, IDispatch dispatch)Creates a ProxyObject for the given interface and IDispatch pointer.(package private) Guid.GUIDdiscoverClsId(ComObject annotation)voiddisposeAll()<T> TfetchObject(java.lang.Class<T> comInterface)Gets and existing COM object (GetActiveObject) for the given progId and returns a ProxyObject for the given interface.protected voidfinalize()WinDef.LCIDgetLCID()Retrieve the LCID to be used for COM calls.IRunningObjectTablegetRunningObjectTable()CoInitialize must be called be fore this method.voidregister(ProxyObject proxyObject)voidsetLCID(WinDef.LCID value)Set the LCID to use for COM calls.voidunregister(ProxyObject proxyObject)
 
- 
- 
- 
Method Detail- 
finalizeprotected void finalize() throws java.lang.Throwable- Overrides:
- finalizein class- java.lang.Object
- Throws:
- java.lang.Throwable
 
 - 
getRunningObjectTablepublic IRunningObjectTable getRunningObjectTable() CoInitialize must be called be fore this method. Either explicitly or implicitly via other methods.- Returns:
- running object table
 
 - 
createProxypublic <T> T createProxy(java.lang.Class<T> comInterface, IDispatch dispatch)Creates a ProxyObject for the given interface and IDispatch pointer.
 - 
createObjectpublic <T> T createObject(java.lang.Class<T> comInterface) Creates a new COM object (CoCreateInstance) for the given progId and returns a ProxyObject for the given interface.
 - 
fetchObjectpublic <T> T fetchObject(java.lang.Class<T> comInterface) throws COMExceptionGets and existing COM object (GetActiveObject) for the given progId and returns a ProxyObject for the given interface.- Throws:
- COMException
 
 - 
createDispatchCallbackIDispatchCallback createDispatchCallback(java.lang.Class<?> comEventCallbackInterface, IComEventCallbackListener comEventCallbackListener) 
 - 
registerpublic void register(ProxyObject proxyObject) 
 - 
unregisterpublic void unregister(ProxyObject proxyObject) 
 - 
disposeAllpublic void disposeAll() 
 - 
getLCIDpublic WinDef.LCID getLCID() Retrieve the LCID to be used for COM calls.- Returns:
- If setLCIDis not called retrieves the users default locale, else the set LCID.
 
 - 
setLCIDpublic void setLCID(WinDef.LCID value) Set the LCID to use for COM calls.- Parameters:
- value- override LCID. NULL resets to default.
 
 
- 
 
-