Sun Adapter for COM/DCOM API
Class STCComOptionalArgument

  extended by
      extended by

public class STCComOptionalArgument
extends STCComVariant

The STCComOptionalArgument class is provided as a convenience class for the user. There are cases where parameters to a COM method are marked as optional. Many times these parameters would be provided by the caller, but there are times when they are not needed because the semantics of the method are such that, if they are not passed, the method will use reasonable defaults internally. However, even if the parameter is not supplied, the method call still needs a place holder for the parameter. COM rules dictate that the VARIANT be passed with an error code indicating the parameter is not being supplied. This class is an extension of the STCComVariant with the appropriate error code, and can be passed to indicate a value is not being passed for that parameter.

See Also:

Field Summary
Fields inherited from class
bIsArray, bIsByRef, booleanValue, dateValue, dispValue, doubleValue, errorValue, floatValue, intValue, nArrayDim, pbooleanValue, pdateValue, pdispValue, pdoubleValue, perrorValue, pfloatValue, pintValue, ppbooleanValue, ppdateValue, ppdoubleValue, pperrorValue, ppfloatValue, ppintValue, ppshortValue, ppstringValue, pshortValue, pstringValue, shortValue, stringValue, variantValue, vt
Constructor Summary
          Constructor for the class.
Method Summary
Methods inherited from class
clear, getArrayDim, getIsArray, getIsByRef, getVartype, getVT_BOOL_1D, getVT_BOOL_2D, getVT_BOOL, getVT_BSTR_1D, getVT_BSTR_2D, getVT_BSTR, getVT_DATE_1D, getVT_DATE_2D, getVT_DATE, getVT_DISPATCH_1D, getVT_DISPATCH, getVT_ERROR_1D, getVT_ERROR_2D, getVT_ERROR, getVT_I2_1D, getVT_I2_2D, getVT_I2, getVT_I4_1D, getVT_I4_2D, getVT_I4, getVT_R4_1D, getVT_R4, getVT_R8_1D, getVT_R8_2D, getVT_R8, getVT_VARIANT, setArrayDim, setIsArray, setIsByRef, setVartype, setVT_BOOL_1D, setVT_BOOL_2D, setVT_BOOL, setVT_BSTR_1D, setVT_BSTR_2D, setVT_BSTR, setVT_DATE_1D, setVT_DATE_2D, setVT_DATE, setVT_DISPATCH_1D, setVT_DISPATCH, setVT_ERROR_1D, setVT_ERROR_2D, setVT_ERROR, setVT_I2_1D, setVT_I2_2D, setVT_I2, setVT_I4_1D, setVT_I4_2D, setVT_I4, setVT_R4_1D, setVT_R4, setVT_R8_1D, setVT_R8_2D, setVT_R8, setVT_VARIANT
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public STCComOptionalArgument()
                       throws STCComException
Constructor for the class. Sets the vartype and error code of the STCComVariant appropriately.


STCComException - Only necessary to declare this since the underlying STCComVarian constructor being used is declared to throw this exception.

Sun Adapter for COM/DCOM API

Copyright © 1994-2008 Sun Microsystems, Inc. All rights reserved.