The methods queryInterface and areSame delegate
calls to the implementing objects and are used instead of casts,
instanceof, ==, and equals.
For historic reasons, this class is not final, and has a
public constructor. These artifacts are considered mistakes,
which might be corrected in a future version of this class, so client code
should not rely on them.
com.sun.star.uno.IBridge , com.sun.star.uno.IEnvironment , com.sun.star.uno.IQueryInterface
| Modifier and Type | Class and Description |
|---|---|
| private static class | UnoRuntime.
References Deprecated
IBridge is deprecated or references (maybe indirectly) at least one deprecated element.
|
| private static class | UnoRuntime.
References Deprecated
IMapping is deprecated or references (maybe indirectly) at least one deprecated element.
|
| Modifier and Type | Field and Description |
|---|---|
| private static final WeakMap | |
| private static final ThreadLocal | |
| public static final boolean | DEBUG
Deprecated
As of UDK 3.2.0, do not use this internal field.
|
| private static final WeakMap | |
| private static final WeakHashMap | |
| private static final String | |
| private static long | |
| private static final String | |
| private static final Object | |
| private static long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static boolean | |
| public static final Object | Returns: the given value, or the neutral value of the given type, if the given value was an invalidnull value.a non-void, non-exception UNO type. type, Object a Java value representing a UNO value of the given UNO type,
or value)null.Complete a UNO value (make sure it is no invalid |
| public static String | Returns: the generated OIDany object for which an OID shall be generated; must not be
object)nullGenerates a worldwide unique object identifier (OID) for the given Java object. |
| public static IBridge | Returns: the requested bridgethe source environment from, IEnvironment the target environment to, Object[] the initial arguments for the bridge args)
Deprecated
As of UDK 3.2.0, this method is deprecated, without
offering a replacement.
Gets a bridge from environment |
| public static IBridge | Returns: the requested bridgethe name of the source environment from, Object the context for the source environment fromContext, String the name of the target environment to, Object the context for the target environment toContext, Object[] the initial arguments for the bridge args)
Deprecated
As of UDK 3.2.0, this method is deprecated, without
offering a replacement.
Gets a bridge from environment |
| public static IBridge[] | Returns: an array ofIBridge objects
Deprecated
As of UDK 3.2.0, this method is deprecated, without
offering a replacement.
Returns an array of all active bridges. |
| public static com. | Returns: the current context of the current thread, ornull
if no context has been set for the current threadGets the current context of the current thread, or |
| public static IEnvironment | Returns: an environment.the name of the environment name, Object the context of the environment context)
Deprecated
As of UDK 3.2.0, this method is deprecated, without
offering a replacement.
Retrieves an environment of type |
| public static IMapping | Returns: the requested mappingthe source environment from, IEnvironment the target environment to)
Deprecated
As of UDK 3.2.0, this method is deprecated, without
offering a replacement.
Gets a mapping from environment |
| public static IMapping | Returns: the requested mappingthe name of the source environment from, String the name of the target environment to)
Deprecated
As of UDK 3.2.0, this method is deprecated, without
offering a replacement.
Gets a mapping from environment |
| public static String | |
| public static Object | Returns: a reference to the requested UNO interface type if available, otherwisenullthe requested UNO interface type; must be a type, Object Type
object representing a UNO interface typea reference to any Java object representing (a facet of) a
UNO object; may be object)nullQueries the given UNO object for the given UNO interface type. |
| public static < the requested UNO interface type. T> T | Returns: a reference to the requested UNO interface type if available, otherwisenulla Java class representing a UNO interface type zInterface, Object a reference to any Java object representing (a facet of) a
UNO object; may be object)nullQueries the given UNO object for the given Java class (which must represent a UNO interface type). |
| public static boolean | Returns: true if another thread didn't re-insert some bridge or environment before the method returns. Why that information would be useful is anybody's guess.
Deprecated
As of UDK 3.2.0, this method is deprecated, without
offering a replacement.
Resets this |
| public static void | setCurrentContext(com.
the context to be set; if contextnull, any
previously set context will be removedSets the current context for the current thread. |
| bridges | back to summary |
|---|---|
| private static final WeakMap<String, IBridge> bridges | |
| currentContext | back to summary |
|---|---|
| private static final ThreadLocal<com. | |
| DEBUG | back to summary |
|---|---|
| public static final boolean DEBUG
Deprecated As of UDK 3.2.0, do not use this internal field. | |
| environments | back to summary |
|---|---|
| private static final WeakMap<String, IEnvironment> environments | |
| oidMap | back to summary |
|---|---|
| private static final WeakHashMap<Object, String> oidMap | |
| oidSuffix | back to summary |
|---|---|
| private static final String oidSuffix | |
| uniqueKeyCount | back to summary |
|---|---|
| private static long uniqueKeyCount | |
| uniqueKeyHostPrefix | back to summary |
|---|---|
| private static final String uniqueKeyHostPrefix | |
| uniqueKeyLock | back to summary |
|---|---|
| private static final Object uniqueKeyLock | |
| uniqueKeyTime | back to summary |
|---|---|
| private static long uniqueKeyTime | |
| UnoRuntime | back to summary |
|---|---|
| public UnoRuntime()
Deprecated As of UDK 3.2.0, do not create instances of this class.
It is considered a historic mistake to have a
| |
| areSame | back to summary |
|---|---|
| public static boolean areSame(Object any1, Object any2) Tests two UNO Two UNO values are equal if and only if they are of the same UNO type t, and they meet the following condition, depending on t:
| |
| completeValue | back to summary |
|---|---|
| public static final Object completeValue(Type type, Object value) Complete a UNO value (make sure it is no invalid This is useful for members of parameterized type of instantiated
polymorphic struct types, as | |
| generateOid | back to summary |
|---|---|
| public static String generateOid(Object object) Generates a worldwide unique object identifier (OID) for the given Java object. It is guaranteed that subsequent calls to this method with the same Java object will give the same ID. This method is generally of little use for client code. It should be considered a mistake that this method is published at all.
| |
| getBridge | back to summary |
|---|---|
| public static IBridge getBridge(IEnvironment from, IEnvironment to, Object[] args) throws Exception
Deprecated As of UDK 3.2.0, this method is deprecated, without offering a replacement. Gets a bridge from environment Creates a new bridge, if the requested bridge does not yet exist, and hands the arguments to the bridge. If the requested bridge does not exist, it is searched for in package
| |
| getBridgeByName | back to summary |
|---|---|
| public static IBridge getBridgeByName(String from, Object fromContext, String to, Object toContext, Object[] args) throws Exception
Deprecated As of UDK 3.2.0, this method is deprecated, without offering a replacement. Gets a bridge from environment Creates a new bridge, if the requested bridge does not yet exist, and hands the arguments to the bridge. If the requested bridge does not exist, it is searched for in package
| |
| getBridges | back to summary |
|---|---|
| public static IBridge[] getBridges()
Deprecated As of UDK 3.2.0, this method is deprecated, without offering a replacement. Returns an array of all active bridges.
| |
| getCurrentContext | back to summary |
|---|---|
| public static com. Gets the current context of the current thread, or The current context is thread local, which means that this method returns the context that was last set for this thread.
| |
| getEnvironment | back to summary |
|---|---|
| public static IEnvironment getEnvironment(String name, Object context) throws Exception
Deprecated As of UDK 3.2.0, this method is deprecated, without offering a replacement. Retrieves an environment of type Environments are held weakly by this class. If the requested
environment already exists, this methods simply returns it. Otherwise,
this method looks for it under
| |
| getMapping | back to summary |
|---|---|
| public static IMapping getMapping(IEnvironment from, IEnvironment to) throws Exception
Deprecated As of UDK 3.2.0, this method is deprecated, without offering a replacement. Gets a mapping from environment Mappings are like bridges, except that with mappings one can only map in one direction. Mappings are here for compatibility with the binary UNO API. Mappings are implemented as wrappers around bridges.
| |
| getMappingByName | back to summary |
|---|---|
| public static IMapping getMappingByName(String from, String to) throws Exception
Deprecated As of UDK 3.2.0, this method is deprecated, without offering a replacement. Gets a mapping from environment The used environments are retrieved through
| |
| getUniqueKey | back to summary |
|---|---|
| public static String getUniqueKey() Generates a worldwide unique identifier string. It is guaranteed that every invocation of this method generates a new ID, which is unique within the VM. The quality of “worldwide unique” will depend on the actual implementation, you should look at the source to determine if it meets your requirements.
| |
| queryInterface | back to summary |
|---|---|
| public static Object queryInterface(Type type, Object object) Queries the given UNO object for the given UNO interface type. This method returns
| |
| queryInterface | back to summary |
|---|---|
| public static <T> T queryInterface(Class<T> zInterface, Object object) Queries the given UNO object for the given Java class (which must represent a UNO interface type).
| |
| reset | back to summary |
|---|---|
| public static boolean reset()
Deprecated As of UDK 3.2.0, this method is deprecated, without offering a replacement. Resets this Releases all references to bridges and environments.
| |
| setCurrentContext | back to summary |
|---|---|
| public static void setCurrentContext(com. Sets the current context for the current thread. The current context is thread local. To support a stacking behaviour,
every function that sets the current context should reset it to the
original value when exiting (for example, within a
| |
References Deprecated
IBridge is deprecated or references (maybe indirectly) at least one deprecated element.
See corresponding docs for further information.
| Modifier and Type | Field and Description |
|---|---|
| private final IBridge |
| Access | Constructor and Description |
|---|---|
| public | BridgeTurner(IBridge bridge)
References Deprecated
IBridge is deprecated or references (maybe indirectly) at least one deprecated element.
|
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public IEnvironment | getSourceEnvironment()
Implements com.
References Deprecated
IEnvironment is deprecated or references (maybe indirectly) at least one deprecated element.
Returns the source environment. |
| public IEnvironment | getTargetEnvironment()
Implements com.
References Deprecated
IEnvironment is deprecated or references (maybe indirectly) at least one deprecated element.
Returns the destination environment. |
| public Object | mapInterfaceFrom(Object object, Type type)
Implements com. Maps an object from the destination environment to the source environment. |
| public Object | mapInterfaceTo(Object object, Type type)
Implements com. Maps an object from the source environment to the destination environment. |
| public void |
| bridge | back to summary |
|---|---|
| private final IBridge bridge
References Deprecated
See corresponding docs for further information. | |
| BridgeTurner | back to summary |
|---|---|
| public BridgeTurner(IBridge bridge)
References Deprecated
See corresponding docs for further information. | |
| acquire | back to summary |
|---|---|
| public void acquire() Implements com. Doc from com. Increases the life count. | |
| dispose | back to summary |
|---|---|
| public void dispose() throws InterruptedException, IOException Implements com. Doc from com. Disposes the bridge. Sends involved threads an
| |
| getSourceEnvironment | back to summary |
|---|---|
| public IEnvironment getSourceEnvironment() Implements com. Doc from com. References Deprecated
See corresponding docs for further information. Returns the source environment. | |
| getTargetEnvironment | back to summary |
|---|---|
| public IEnvironment getTargetEnvironment() Implements com. Doc from com. References Deprecated
See corresponding docs for further information. Returns the destination environment. | |
| mapInterfaceFrom | back to summary |
|---|---|
| public Object mapInterfaceFrom(Object object, Type type) Implements com. Doc from com. Maps an object from the destination environment to the source environment. | |
| mapInterfaceTo | back to summary |
|---|---|
| public Object mapInterfaceTo(Object object, Type type) Implements com. Doc from com. Maps an object from the source environment to the destination environment. | |
| release | back to summary |
|---|---|
| public void release() Implements com. Doc from com. Decreases the life count. If the life count drops to zero, the bridge disposes itself. | |
References Deprecated
IMapping is deprecated or references (maybe indirectly) at least one deprecated element.
See corresponding docs for further information.
| Modifier and Type | Field and Description |
|---|---|
| private final IBridge |
| Access | Constructor and Description |
|---|---|
| public | MappingWrapper(IBridge bridge)
References Deprecated
IBridge is deprecated or references (maybe indirectly) at least one deprecated element.
|
| Modifier and Type | Method and Description |
|---|---|
| public Object | mapInterface(Object object, Type type)
Implements com. Maps an interface from one environment to another. |
| bridge | back to summary |
|---|---|
| private final IBridge bridge
References Deprecated
See corresponding docs for further information. | |
| MappingWrapper | back to summary |
|---|---|
| public MappingWrapper(IBridge bridge)
References Deprecated
See corresponding docs for further information. | |
| mapInterface | back to summary |
|---|---|
| public Object mapInterface(Object object, Type type) Implements com. Doc from com. Maps an interface from one environment to another. | |