Package com.sun.star.uno
Class Any
- java.lang.Object
-
- com.sun.star.uno.Any
-
public class Any extends Object
The UNO IDL type any is mapped to java typejava.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).
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Any
complete(Object any)
Complete a UNOANY
(make sure it is wrapped up as anAny
instance).boolean
equals(Object obj)
Indicates whether some other object is equal to this one.Object
getObject()
Gets the value within the any.Type
getType()
Gets the type of the value within the any.int
hashCode()
Returns a hash code value for the object.String
toString()
Returns a string representation of the object.
-
-
-
Field Detail
-
_object
protected Object _object
The data of the any.- See Also:
getObject()
-
VOID
public static final Any VOID
-
-
Constructor Detail
-
Any
@Deprecated public Any(Class<?> zInterface, Object object)
Deprecated.as of UDK 2.0Constructs a new any.- Parameters:
zInterface
- the type of the any.object
- the data of the any.
-
-
Method Detail
-
complete
public static final Any complete(Object any)
Complete a UNOANY
(make sure it is wrapped up as anAny
instance).- Parameters:
any
- a Java value representing a UNOANY
value.- Returns:
- a complete Java value (that is, an
Any
instance) representing the same UNOANY
value as the given argument. - Since:
- UDK 3.2.3
-
getType
public Type getType()
Gets the type of the value within the any.- Returns:
- the type of the value within the any.
-
getObject
public Object getObject()
Gets the value within the any.- Returns:
- gets the value within the any.
-
equals
public boolean equals(Object obj)
Indicates whether some other object is equal to this one.- Overrides:
equals
in classObject
- Parameters:
obj
- the reference object with which to compare.- Returns:
true
if this object is the same as the obj argument;false
otherwise.- See Also:
Object.equals(java.lang.Object)
-
hashCode
public int hashCode()
Returns a hash code value for the object.- Overrides:
hashCode
in classObject
- Returns:
- a hash code value for this object.
- See Also:
Object.hashCode()
-
toString
public String toString()
Returns a string representation of the object.- Overrides:
toString
in classObject
- Returns:
- a string representation of the object.
- See Also:
Object.toString()
-
-