public class Any
extends java.lang.Object
java.lang.Object
.
In special cases it is necessary to have an explicit any to additionally transport an exact type. For instance if you want to pass an object reference via an interprocess connection using an any, you should use this class to add an explicit interface type, so the remote counterpart doesn't need to invoke a queryInterface).
Modifier and Type | Field and Description |
---|---|
protected java.lang.Object |
_object
The data of the any.
|
protected Type |
_type
The type of the any.
|
static Any |
VOID |
Constructor and Description |
---|
Any(java.lang.Class zInterface,
java.lang.Object object)
Deprecated.
as of UDK 2.0
|
Any(Type type,
java.lang.Object object)
Constructs a new any with a given type and value
|
Modifier and Type | Method and Description |
---|---|
static Any |
complete(java.lang.Object any)
Complete a UNO
ANY (make sure it is wrapped up as an
Any instance). |
boolean |
equals(java.lang.Object obj) |
java.lang.Object |
getObject()
Gets the value within the any.
|
Type |
getType()
Gets the type of the value within the any.
|
int |
hashCode() |
java.lang.String |
toString() |
protected java.lang.Object _object
getObject()
public static final Any VOID
public Any(java.lang.Class zInterface, java.lang.Object object)
zInterface
- the type of the any.object
- the data of the any.public Any(Type type, java.lang.Object object)
type
- the UNO type of the any.object
- the value of the any.public static final Any complete(java.lang.Object any)
ANY
(make sure it is wrapped up as an
Any
instance).any
- a Java value representing a UNO ANY
value.Any
instance)
representing the same UNO ANY
value as the given argument.public Type getType()
public java.lang.Object getObject()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object