Microsoft SDK for Java

toScriptObject

This method of the Variant Class coerces the Variant object to a VT_UNKNOWN, VT_BSTR, VT_BOOL, or VT_R8 and returns the coerced result.

Syntax

public native Object toScriptObject() throws ClassCastException;

Return Value

Returns the coerced value converted to a Java type as follows:

VT_BSTR is converted to java.lang.String.

VT_BOOL is converted to java.lang.boolean.

Numeric types convertible by Variant.changetype to VT_R8 are converted to java.lang.double.

Exceptions

ClassCastException if the Variant object's type cannot be coerced.

Remarks

This method was added as of versions 2437 through 2925 of the Microsoft virtual machine.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.