Top Description Fields Constructors Methods
com.sun.star.uno

public Class Any

extends Object
Class Inheritance

The UNO IDL type any is mapped to java type 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).

Field Summary

Modifier and TypeField and Description
protected Object
_object

The data of the any.

protected Type
_type

The type of the any.

public static final Any

Constructor Summary

AccessConstructor and Description
public
Any(Class<?>
the type of the any.
zInterface
,
Object
the data of the any.
object
)
Deprecated as of UDK 2.0

Constructs a new any.

public
Any(Type
the UNO type of the any.
type
,
Object
the value of the any.
object
)

Constructs a new any with a given type and value

Method Summary

Modifier and TypeMethod and Description
public static final Any

Returns:

a complete Java value (that is, an Any instance) representing the same UNO ANY value as the given argument.
complete
(Object
a Java value representing a UNO ANY value.
any
)

Complete a UNO ANY (make sure it is wrapped up as an Any instance).

public boolean

Returns:

true if this object is the same as the obj argument; false otherwise.
equals
(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Indicates whether some other object is equal to this one.

public Object

Returns:

gets the value within the any.
getObject
()

Gets the value within the any.

public Type

Returns:

the type of the value within the any.
getType
()

Gets the type of the value within the any.

public int

Returns:

a hash code value for this object.
hashCode
()

Overrides java.lang.Object.hashCode.

Returns a hash code value for the object.

public String

Returns:

a string representation of the object.
toString
()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

_objectback to summary
protected Object _object

The data of the any.

See Also
getObject
_typeback to summary
protected Type _type

The type of the any.

See Also
getType
VOIDback to summary
public static final Any VOID

Constructor Detail

Anyback to summary
public Any(Class<?> zInterface, Object object)

Deprecated

as of UDK 2.0

Constructs a new any.

Parameters
zInterface:Class<?>

the type of the any.

object:Object

the data of the any.

Annotations
@Deprecated
Anyback to summary
public Any(Type type, Object object)

Constructs a new any with a given type and value

Parameters
type:Type

the UNO type of the any.

object:Object

the value of the any.

Method Detail

completeback to summary
public static final Any complete(Object any)

Complete a UNO ANY (make sure it is wrapped up as an Any instance).

Parameters
any:Object

a Java value representing a UNO ANY value.

Returns:Any

a complete Java value (that is, an Any instance) representing the same UNO ANY value as the given argument.

Since
UDK 3.2.3
equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Indicates whether some other object is equal to this one.

Parameters
obj:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
See Also
java.lang.Object#equals
getObjectback to summary
public Object getObject()

Gets the value within the any.

Returns:Object

gets the value within the any.

getTypeback to summary
public Type getType()

Gets the type of the value within the any.

Returns:Type

the type of the value within the any.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for the object.

Returns:int

a hash code value for this object.

Annotations
@Override
See Also
java.lang.Object#hashCode
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
See Also
java.lang.Object#toString