|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jinterop.dcom.core.JIVariant
public final class JIVariant
Class representing the VARIANT
datatype. Please use the byRef
flag based CTORs for constructing "by reference"
parameters in COM calls. Also note that the library is unaware of [OPTIONAL]
parameters , hence they have to be sent as
JIVariant.OPTIONAL_PARAM
.
Please note that if the byRef
flag is set then
that Variant should also be added as the outparam to the JICallObject. For developers using the IJIDispatch
variant would be returned back to them via the return type JIVariant[] associated with IJIDispatch
Apis.
An important note for Boolean Arrays (JIArray of Boolean), please set the JIFlag.FLAG_REPRESENTATION_VARIANT_BOOL using the setFlag
API before making a call on this JIVariant. This is required since in DCOM , Variant bools are 2 bytes and standard bools are 1 byte in length.
Field Summary | |
---|---|
static JIVariant |
EMPTY
EMPTY VARIANT |
static JIVariant |
EMPTY_BYREF
EMPTY BYREF VARIANT |
static int |
FADF_AUTO
|
static int |
FADF_BSTR
|
static int |
FADF_DISPATCH
|
static int |
FADF_EMBEDDED
|
static int |
FADF_FIXEDSIZE
|
static int |
FADF_HAVEIID
|
static int |
FADF_HAVEVARTYPE
|
static int |
FADF_RECORD
|
static int |
FADF_RESERVED
|
static int |
FADF_STATIC
|
static int |
FADF_UNKNOWN
|
static int |
FADF_VARIANT
|
static JIVariant |
NULL
NULL VARIANT |
static JIVariant |
OPTIONAL_PARAM
OPTIONAL PARAM. |
static org.jinterop.dcom.core.JIVariant.SCODE |
SCODE
SCODE VARIANT |
static int |
VT_ARRAY
|
static int |
VT_BOOL
|
static int |
VT_BSTR
|
static int |
VT_BYREF
|
static int |
VT_BYREF_VT_ARRAY
|
static int |
VT_BYREF_VT_BOOL
|
static int |
VT_BYREF_VT_BSTR
|
static int |
VT_BYREF_VT_CY
|
static int |
VT_BYREF_VT_DATE
|
static int |
VT_BYREF_VT_DECIMAL
|
static int |
VT_BYREF_VT_DISPATCH
|
static int |
VT_BYREF_VT_ERROR
|
static int |
VT_BYREF_VT_I1
|
static int |
VT_BYREF_VT_I2
|
static int |
VT_BYREF_VT_I4
|
static int |
VT_BYREF_VT_I8
|
static int |
VT_BYREF_VT_INT
|
static int |
VT_BYREF_VT_R4
|
static int |
VT_BYREF_VT_R8
|
static int |
VT_BYREF_VT_UI1
|
static int |
VT_BYREF_VT_UI2
|
static int |
VT_BYREF_VT_UI4
|
static int |
VT_BYREF_VT_UINT
|
static int |
VT_BYREF_VT_UNKNOWN
|
static int |
VT_BYREF_VT_VARIANT
|
static int |
VT_CY
|
static int |
VT_DATE
|
static int |
VT_DECIMAL
|
static int |
VT_DISPATCH
|
static int |
VT_EMPTY
|
static int |
VT_ERROR
|
static int |
VT_I1
|
static int |
VT_I2
|
static int |
VT_I4
|
static int |
VT_I8
|
static int |
VT_INT
|
static int |
VT_NULL
|
static int |
VT_R4
|
static int |
VT_R8
|
static int |
VT_UI1
|
static int |
VT_UI2
|
static int |
VT_UI4
|
static int |
VT_UINT
|
static int |
VT_UNKNOWN
|
static int |
VT_VARIANT
|
Constructor Summary | |
---|---|
JIVariant(boolean value)
Setting up a VARIANT with a boolean. |
|
JIVariant(boolean value,
boolean isByRef)
Setting up a VARIANT with a boolean. |
|
JIVariant(char value)
Setting up a VARIANT with a char. |
|
JIVariant(char value,
boolean isByRef)
Setting up a VARIANT with a char. |
|
JIVariant(java.util.Date value)
Setting up a VARIANT with an java.util.Date. |
|
JIVariant(java.util.Date value,
boolean isByRef)
Setting up a VARIANT with an java.util.Date. |
|
JIVariant(double value)
Setting up a VARIANT with a double. |
|
JIVariant(double value,
boolean isByRef)
Setting up a VARIANT with a double. |
|
JIVariant(float value)
Setting up a VARIANT with a float. |
|
JIVariant(float value,
boolean isByRef)
Setting up a VARIANT with a float. |
|
JIVariant(IJIDispatch value)
Setting up a VARIANT with a IJIDispatch. |
|
JIVariant(IJIDispatch value,
boolean isByRef)
Setting up a VARIANT with a IJIDispatch. |
|
JIVariant(IJIUnknown value)
Setting up a VARIANT with an IJIUnknown. |
|
JIVariant(IJIUnknown value,
boolean isByRef)
Setting up a VARIANT with an IJIUnknown. |
|
JIVariant(IJIUnsigned number)
Setting up a VARIANT with a unsigned value. |
|
JIVariant(IJIUnsigned number,
boolean isByRef)
Setting up a VARIANT with a unsigned value. |
|
JIVariant(int value)
Setting up a VARIANT with an int. |
|
JIVariant(int value,
boolean isByRef)
Setting up a VARIANT with an int. |
|
JIVariant(JIArray array)
Setting up a VARIANT with a JIArray. |
|
JIVariant(JIArray array,
boolean isByRef)
Setting up a VARIANT with a JIArray. |
|
JIVariant(JIArray array,
boolean isByRef,
int FLAG)
Setting up a VARIANT with a JIArray. |
|
JIVariant(JIArray array,
int FLAG)
Setting up a VARIANT with a JIArray. |
|
JIVariant(JICurrency value)
Setting up a VARIANT with a JICurrency. |
|
JIVariant(JICurrency value,
boolean isByRef)
Setting up a VARIANT with a JICurrency. |
|
JIVariant(JIString value)
Setting up a VARIANT with a JIString. |
|
JIVariant(JIString value,
boolean isByRef)
Setting up a VARIANT with a JIString. |
|
JIVariant(org.jinterop.dcom.core.JIVariant.SCODE value,
int errorCode)
Setting up a VARIANT with a SCODE value and it's errorCode. |
|
JIVariant(org.jinterop.dcom.core.JIVariant.SCODE value,
int errorCode,
boolean isByRef)
Setting up a VARIANT with a SCODE value and it's errorCode. |
|
JIVariant(JIVariant variant)
Setting up a VARIANT with a VARIANT. |
|
JIVariant(long value,
boolean isByRef)
Setting up a VARIANT with a long. |
|
JIVariant(java.lang.Object obj)
Setting up a VARIANT with an object. |
|
JIVariant(short value)
Setting up a VARIANT with a short. |
|
JIVariant(short value,
boolean isByRef)
Setting up a VARIANT with a short. |
|
JIVariant(java.lang.String value)
Setting up a VARIANT with a String. |
|
JIVariant(java.lang.String value,
boolean isByRef)
Setting up a VARIANT with a String. |
Method Summary | |
---|---|
int |
getFlag()
Returns the flag value for this variant. |
java.lang.Object |
getObject()
Returns the contained object. |
JIArray |
getObjectAsArray()
Retrieves the contained object as JIArray. |
boolean |
getObjectAsBoolean()
Retrieves the contained object as boolean. |
char |
getObjectAsChar()
Retrieves the contained object as char. |
IJIComObject |
getObjectAsComObject(IJIComObject template)
Retrieves the contained object as IJIComObject. |
java.util.Date |
getObjectAsDate()
Retrieves the contained object as Date. |
double |
getObjectAsDouble()
Retrieves the contained object as double. |
float |
getObjectAsFloat()
Retrieves the contained object as float. |
int |
getObjectAsInt()
Retrieves the contained object as int. |
JIInterfacePointer |
getObjectAsInterfacePointer()
Deprecated. Please use getObjectAsComObject instead. |
long |
getObjectAsLong()
Retrieves the contained object as long, used when the expected type is VT_I8. |
int |
getObjectAsSCODE()
Retrieves the contained objects errorCode. |
short |
getObjectAsShort()
Retrieves the contained object as short. |
JIString |
getObjectAsString()
Retrieves the contained object as JIString. |
java.lang.String |
getObjectAsString2()
Retrieves the contained object as Java String. |
IJIUnsigned |
getObjectAsUnsigned()
Retrieves the contained object as unsigned number. |
JIVariant |
getObjectAsVariant()
Retrieves the contained object as JIVariant. |
int |
getType()
Returns the referent as integer. |
boolean |
isArray()
|
boolean |
isByRefFlagSet()
|
boolean |
isNull()
Returns whether this Variant is a NULL variant. |
void |
setFlag(int FLAG)
Sets a JIFlags value to be used while encoding (marshalling) this Variant. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int VT_NULL
public static final int VT_EMPTY
public static final int VT_I4
public static final int VT_UI1
public static final int VT_I2
public static final int VT_R4
public static final int VT_R8
public static final int VT_VARIANT
public static final int VT_BOOL
public static final int VT_ERROR
public static final int VT_CY
public static final int VT_DATE
public static final int VT_BSTR
public static final int VT_UNKNOWN
public static final int VT_DECIMAL
public static final int VT_DISPATCH
public static final int VT_ARRAY
public static final int VT_BYREF
public static final int VT_BYREF_VT_UI1
public static final int VT_BYREF_VT_I2
public static final int VT_BYREF_VT_I4
public static final int VT_BYREF_VT_R4
public static final int VT_BYREF_VT_R8
public static final int VT_BYREF_VT_BOOL
public static final int VT_BYREF_VT_ERROR
public static final int VT_BYREF_VT_CY
public static final int VT_BYREF_VT_DATE
public static final int VT_BYREF_VT_BSTR
public static final int VT_BYREF_VT_UNKNOWN
public static final int VT_BYREF_VT_DISPATCH
public static final int VT_BYREF_VT_ARRAY
public static final int VT_BYREF_VT_VARIANT
public static final int VT_I1
public static final int VT_UI2
public static final int VT_UI4
public static final int VT_I8
public static final int VT_INT
public static final int VT_UINT
public static final int VT_BYREF_VT_DECIMAL
public static final int VT_BYREF_VT_I1
public static final int VT_BYREF_VT_UI2
public static final int VT_BYREF_VT_UI4
public static final int VT_BYREF_VT_I8
public static final int VT_BYREF_VT_INT
public static final int VT_BYREF_VT_UINT
public static final int FADF_AUTO
public static final int FADF_STATIC
public static final int FADF_EMBEDDED
public static final int FADF_FIXEDSIZE
public static final int FADF_RECORD
public static final int FADF_HAVEIID
public static final int FADF_HAVEVARTYPE
public static final int FADF_BSTR
public static final int FADF_UNKNOWN
public static final int FADF_DISPATCH
public static final int FADF_VARIANT
public static final int FADF_RESERVED
public static final JIVariant EMPTY
VARIANT
public static final JIVariant EMPTY_BYREF
VARIANT
public static final JIVariant NULL
VARIANT
public static final JIVariant OPTIONAL_PARAM
public static final org.jinterop.dcom.core.JIVariant.SCODE SCODE
VARIANT
Constructor Detail |
---|
public JIVariant(java.lang.Object obj)
VARIANT
with an object. Used via serializing the VARIANT
.
obj
- public JIVariant(JIVariant variant)
VARIANT
with a VARIANT. Used via serializing the VARIANT
.
variant
- public JIVariant(int value, boolean isByRef)
VARIANT
with an int. Used via serializing the VARIANT
.
Used when the variant type is VT_I4.
value
- isByRef
- true if the value is to be represented as a pointer. LONG*public JIVariant(long value, boolean isByRef)
VARIANT
with a long. Used via serializing the VARIANT
.
Used when the variant type is VT_I8.
value
- isByRef
- true if the value is to be represented as a pointer.public JIVariant(float value, boolean isByRef)
VARIANT
with a float. Used via serializing the VARIANT
.
value
- isByRef
- true if the value is to be represented as a pointer. FLOAT*public JIVariant(boolean value, boolean isByRef)
VARIANT
with a boolean. Used via serializing the VARIANT
.
value
- isByRef
- true if the value is to be represented as a pointer. VARIANT_BOOL*public JIVariant(double value, boolean isByRef)
VARIANT
with a double. Used via serializing the VARIANT
.
value
- isByRef
- true if the value is to be represented as a pointer. DOUBLE*public JIVariant(short value, boolean isByRef)
VARIANT
with a short. Used via serializing the VARIANT
.
value
- isByRef
- true if the value is to be represented as a pointer. SHORT*public JIVariant(char value, boolean isByRef)
VARIANT
with a char. Used via serializing the VARIANT
.
value
- isByRef
- true if the value is to be represented as a pointer. CHAR*public JIVariant(JIString value, boolean isByRef)
VARIANT
with a JIString. Used via serializing the VARIANT
.
value
- isByRef
- true if the value is to be represented as a pointer. BSTR*public JIVariant(java.lang.String value, boolean isByRef)
VARIANT
with a String. Used via serializing the VARIANT
. Internally a
JIString is formed with it's default type BSTR.
value
- isByRef
- true if the value is to be represented as a pointer. BSTR*public JIVariant(java.lang.String value)
VARIANT
with a String. Used via serializing the VARIANT
. Internally a
JIString is formed with it's default type BSTR.
value
- public JIVariant(IJIDispatch value, boolean isByRef)
VARIANT
with a IJIDispatch. Used via serializing the VARIANT
.
value
- isByRef
- true if the value is to be represented as a pointer. IJIDispatch**public JIVariant(IJIUnknown value, boolean isByRef)
VARIANT
with an IJIUnknown. Used via serializing the VARIANT
.
value
- isByRef
- true if the value is to be represented as a pointer. IJIUnknown**public JIVariant(org.jinterop.dcom.core.JIVariant.SCODE value, int errorCode, boolean isByRef)
VARIANT
with a SCODE value and it's errorCode. Used via serializing the VARIANT
.
value
- errorCode
- isByRef
- true if the value is to be represented as a pointer. SCODE*public JIVariant(int value)
VARIANT
with an int. Used via serializing the VARIANT
.
value
- public JIVariant(float value)
VARIANT
with a float. Used via serializing the VARIANT
.
value
- public JIVariant(boolean value)
VARIANT
with a boolean. Used via serializing the VARIANT
.
value
- public JIVariant(double value)
VARIANT
with a double. Used via serializing the VARIANT
.
value
- public JIVariant(short value)
VARIANT
with a short. Used via serializing the VARIANT
.
value
- public JIVariant(char value)
VARIANT
with a char. Used via serializing the VARIANT
.
value
- public JIVariant(JIString value)
VARIANT
with a JIString. Used via serializing the VARIANT
.
value
- public JIVariant(IJIDispatch value)
VARIANT
with a IJIDispatch. Used via serializing the VARIANT
.
value
- public JIVariant(IJIUnknown value)
VARIANT
with an IJIUnknown. Used via serializing the VARIANT
.
value
- public JIVariant(java.util.Date value)
VARIANT
with an java.util.Date. Used via serializing the VARIANT
.
value
- public JIVariant(java.util.Date value, boolean isByRef)
VARIANT
with an java.util.Date. Used via serializing the VARIANT
.
value
- isByRef
- true if the value is to be represented as a pointer. Date*public JIVariant(JICurrency value)
VARIANT
with a JICurrency. Used via serializing the VARIANT
.
value
- public JIVariant(JICurrency value, boolean isByRef)
VARIANT
with a JICurrency. Used via serializing the VARIANT
.
value
- isByRef
- true if the value is to be represented as a pointer. JICurrency*public JIVariant(org.jinterop.dcom.core.JIVariant.SCODE value, int errorCode)
VARIANT
with a SCODE value and it's errorCode. Used via serializing the VARIANT
.
value
- errorCode
- public JIVariant(JIArray array, int FLAG)
VARIANT
with a JIArray. Used via serializing the VARIANT
.
Only 1 and 2 dimensional array is supported. The elements within the array cannot be JIVariants.
array
- FLAG
- JIFlag valuepublic JIVariant(JIArray array, boolean isByRef, int FLAG)
VARIANT
with a JIArray. Used via serializing the VARIANT
.
Only 1 and 2 dimensional array is supported. The elements within the array cannot be JIVariants.
array
- isByRef
- FLAG
- JIFlag valuepublic JIVariant(JIArray array, boolean isByRef)
VARIANT
with a JIArray. Used via serializing the VARIANT
.
Only 1 and 2 dimensional array is supported. The elements within the array cannot be JIVariants.
array
- isByRef
- public JIVariant(JIArray array)
VARIANT
with a JIArray. Used via serializing the VARIANT
.
array
- public JIVariant(IJIUnsigned number)
VARIANT
with a unsigned value. Used via serializing the VARIANT
.
number
- public JIVariant(IJIUnsigned number, boolean isByRef)
VARIANT
with a unsigned value. Used via serializing the VARIANT
.
number
- isByRef
- true if the value is to be represented as a pointer.Method Detail |
---|
public void setFlag(int FLAG)
FLAG
- public int getFlag()
public boolean isNull()
public java.lang.Object getObject() throws JIException
JIException
public int getObjectAsInt() throws JIException
JIException
public float getObjectAsFloat() throws JIException
JIException
public int getObjectAsSCODE() throws JIException
JIException
public double getObjectAsDouble() throws JIException
JIException
public short getObjectAsShort() throws JIException
JIException
public boolean getObjectAsBoolean() throws JIException
JIException
public JIString getObjectAsString() throws JIException
JIException
public java.lang.String getObjectAsString2() throws JIException
JIException
public java.util.Date getObjectAsDate() throws JIException
JIException
public char getObjectAsChar() throws JIException
JIException
public JIInterfacePointer getObjectAsInterfacePointer() throws JIException
JIException
public IJIComObject getObjectAsComObject(IJIComObject template) throws JIException
template
- IJIComObject
whose basic parameters such as JIComServer
will be used while creating the new Instance.
JIException
public JIVariant getObjectAsVariant() throws JIException
JIException
public JIArray getObjectAsArray() throws JIException
JIException
public long getObjectAsLong() throws JIException
JIException
public IJIUnsigned getObjectAsUnsigned() throws JIException
JIException
public boolean isArray() throws JIException
JIException
public boolean isByRefFlagSet() throws JIException
JIException
public int getType() throws JIException
JIException
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |