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 Anycomplete(Object any)Complete a UNOANY(make sure it is wrapped up as anAnyinstance).booleanequals(Object obj)Indicates whether some other object is equal to this one.ObjectgetObject()Gets the value within the any.TypegetType()Gets the type of the value within the any.inthashCode()Returns a hash code value for the object.StringtoString()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 anAnyinstance).- Parameters:
any- a Java value representing a UNOANYvalue.- Returns:
- a complete Java value (that is, an
Anyinstance) representing the same UNOANYvalue 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:
equalsin classObject- Parameters:
obj- the reference object with which to compare.- Returns:
trueif this object is the same as the obj argument;falseotherwise.- See Also:
Object.equals(java.lang.Object)
-
hashCode
public int hashCode()
Returns a hash code value for the object.- Overrides:
hashCodein 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:
toStringin classObject- Returns:
- a string representation of the object.
- See Also:
Object.toString()
-
-