|
Sun Adapter for COM/DCOM API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.stc.connector.comadapter.comruntime.STCComVariant
public class STCComVariant
The STCComVariant class wraps the concept of the COM VARIANT type. Not all types in COM are supported; mainly a subset of those allowed in COM automation.
Like the COM VARIANT, the members are mostly public so it emulates a C structure. And like the VARIANT, the values are held in public members. The vt member variable is the discriminator which indicates which data member holds the value.
STCComVARTYPE
Field Summary | |
---|---|
boolean |
bIsArray
Set to true if the argument is an array. |
boolean |
bIsByRef
Set to true if the argument is a ByRef arg. |
boolean |
booleanValue
Holds the VT_BOOL value. |
double |
dateValue
Holds the VT_DATE value. |
STCIDispatch |
dispValue
Holds the VT_DISPATCH value. |
double |
doubleValue
Holds the VT_R8 value. |
int |
errorValue
Holds the VT_ERROR value. |
float |
floatValue
Holds the VT_R4 value. |
int |
intValue
Holds the VT_I4 value. |
int |
nArrayDim
If, and only if it is an array, this returns how many dimensions the array is. |
boolean[] |
pbooleanValue
Holds the single dimension array of VT_BOOL. |
double[] |
pdateValue
Holds the single dimension array of VT_DATE. |
STCIDispatch[] |
pdispValue
Holds the single dimension array of VT_DISPATCH. |
double[] |
pdoubleValue
Holds the single dimension array of VT_R8. |
int[] |
perrorValue
Holds the single dimension array of VT_ERROR. |
float[] |
pfloatValue
Holds the single dimension array of VT_R4. |
int[] |
pintValue
Holds the single dimension array of VT_I4. |
boolean[][] |
ppbooleanValue
Holds the 2 dimension array of VT_BOOL. |
double[][] |
ppdateValue
Holds the 2 dimension array of VT_DATE. |
double[][] |
ppdoubleValue
Holds the 2 dimension array of VT_R8. |
int[][] |
pperrorValue
Holds the 2 dimension array of VT_ERROR. |
float[][] |
ppfloatValue
Holds the 2 dimension array of VT_R4. |
int[][] |
ppintValue
Holds the 2 dimension array of VT_I4. |
short[][] |
ppshortValue
Holds the 2 dimension array of VT_I2. |
java.lang.String[][] |
ppstringValue
Holds the 2 dimension array of VT_BSTR. |
short[] |
pshortValue
Holds the single dimension array of VT_I2. |
java.lang.String[] |
pstringValue
Holds the single dimension array of VT_BSTR. |
short |
shortValue
Holds the VT_I2 value. |
java.lang.String |
stringValue
Holds the VT_BSTR value. |
STCComVariant |
variantValue
Holds the VT_VARIANT value. |
int |
vt
This represents the VARTYPE we are holding. |
Constructor Summary | |
---|---|
STCComVariant()
Default constructor. |
|
STCComVariant(boolean b)
Constructor taking a Boolean value. |
|
STCComVariant(double d,
int type)
Constructor taking a double value. |
|
STCComVariant(float f)
Constructor taking a float value. |
|
STCComVariant(int i,
int type)
Constructor taking an int value. |
|
STCComVariant(short s)
Constructor taking a short value. |
|
STCComVariant(STCComVariant v)
Constructor taking a STCComVariant value. |
|
STCComVariant(STCIDispatch dispatch)
Constructor taking an STCIDispatch value. |
|
STCComVariant(java.lang.String s)
Constructor taking a string value. |
Method Summary | |
---|---|
void |
clear()
Similar to VariantClear in COM. |
int |
getArrayDim()
Returns the value of the nArrayDim member. |
boolean |
getIsArray()
Gets the value of the bIsArray member. |
boolean |
getIsByRef()
Gets the value of the bIsByRef member. |
int |
getVartype()
Gets the VARTYPE type of this STCComVariant instance. |
boolean[] |
getVT_BOOL_1D()
Gets the VT_BOOL_1D value. |
boolean[][] |
getVT_BOOL_2D()
Gets the VT_BOOL_2D value. |
boolean |
getVT_BOOL()
Gets the VT_BOOL value. |
java.lang.String[] |
getVT_BSTR_1D()
Gets the VT_BSTR_1D value. |
java.lang.String[][] |
getVT_BSTR_2D()
Gets the VT_BSTR_2D value. |
java.lang.String |
getVT_BSTR()
Gets the VT_BSTR value. |
double[] |
getVT_DATE_1D()
Gets the VT_DATE_1D value. |
double[][] |
getVT_DATE_2D()
Gets the VT_DATE_2D value. |
double |
getVT_DATE()
Gets the VT_DATE value. |
STCIDispatch[] |
getVT_DISPATCH_1D()
Gets the VT_DISPATCH_1D value. |
STCIDispatch |
getVT_DISPATCH()
Gets the VT_DISPATCH value. |
int[] |
getVT_ERROR_1D()
Gets the VT_ERROR_1D value. |
int[][] |
getVT_ERROR_2D()
Gets the VT_ERROR_2D value. |
int |
getVT_ERROR()
Gets the VT_ERROR value. |
short[] |
getVT_I2_1D()
Gets the VT_I2_1D value. |
short[][] |
getVT_I2_2D()
Gets the VT_I2_2D value. |
short |
getVT_I2()
Gets the VT_I2 value. |
int[] |
getVT_I4_1D()
Gets the VT_I4_1D value. |
int[][] |
getVT_I4_2D()
Gets the VT_I4_2D value. |
int |
getVT_I4()
Gets the VT_I4 value. |
float[] |
getVT_R4_1D()
Gets the VT_R4_1D value. |
float |
getVT_R4()
Gets the VT_R4 value. |
double[] |
getVT_R8_1D()
Gets the VT_R8_1D value. |
double[][] |
getVT_R8_2D()
Gets the VT_R8_2D value. |
double |
getVT_R8()
Gets the VT_R8 value. |
STCComVariant |
getVT_VARIANT()
Gets the VT_VARIANT value. |
void |
setArrayDim(int d)
Sets the value of the nArrayDim member. |
void |
setIsArray(boolean b)
Sets the value of the bIsArray member. |
void |
setIsByRef(boolean b)
Sets the value of the bIsByRef member. |
void |
setVartype(int newVT)
Sets the VARTYPE of this STCComVariant instance. |
void |
setVT_BOOL_1D(boolean[] newValue)
Sets the VT_BOOL_1D value. |
void |
setVT_BOOL_2D(boolean[][] newValue)
Sets the VT_BOOL_2D value. |
void |
setVT_BOOL(boolean newValue)
Sets the VT_BOOL value. |
void |
setVT_BSTR_1D(java.lang.String[] newValue)
Sets the VT_BSTR_1D value. |
void |
setVT_BSTR_2D(java.lang.String[][] newValue)
Sets the VT_BSTR_2D value. |
void |
setVT_BSTR(java.lang.String newValue)
Sets the VT_BSTR value. |
void |
setVT_DATE_1D(double[] newValue)
Sets the VT_DATE_1D value. |
void |
setVT_DATE_2D(double[][] newValue)
Sets the VT_DATE_2D value. |
void |
setVT_DATE(double newValue)
Sets the VT_DATE value. |
void |
setVT_DISPATCH_1D(STCIDispatch[] newValue)
Sets the VT_DISPATCH_1D value. |
void |
setVT_DISPATCH(STCIDispatch newValue)
Sets the VT_DISPATCH value |
void |
setVT_ERROR_1D(int[] newValue)
Sets the VT_ERROR_1D value. |
void |
setVT_ERROR_2D(int[][] newValue)
Sets the VT_ERROR_2D value. |
void |
setVT_ERROR(int newValue)
Sets the VT_ERROR value. |
void |
setVT_I2_1D(short[] newValue)
Sets the VT_I2_1D value. |
void |
setVT_I2_2D(short[][] newValue)
Sets the VT_I2_2D value. |
void |
setVT_I2(short newValue)
Sets the VT_I2 value. |
void |
setVT_I4_1D(int[] newValue)
Sets the VT_I4_1D value. |
void |
setVT_I4_2D(int[][] newValue)
Sets the VT_I4_2D value. |
void |
setVT_I4(int newValue)
Sets the VT_I4 value. |
void |
setVT_R4_1D(float[] newValue)
Sets the VT_R4_1D value. |
void |
setVT_R4(float newValue)
Sets the VT_R4 value. |
void |
setVT_R8_1D(double[] newValue)
Sets the VT_R8_1D value. |
void |
setVT_R8_2D(double[][] newValue)
Sets the VT_R8_2D value. |
void |
setVT_R8(double newValue)
Sets the VT_R8 value. |
void |
setVT_VARIANT(STCComVariant newValue)
Sets the VT_VARIANT value. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int vt
public boolean bIsByRef
public boolean bIsArray
public int nArrayDim
public short shortValue
public int intValue
public float floatValue
public double doubleValue
public double dateValue
public java.lang.String stringValue
public STCIDispatch dispValue
public int errorValue
public boolean booleanValue
public STCComVariant variantValue
public short[] pshortValue
public int[] pintValue
public float[] pfloatValue
public double[] pdoubleValue
public double[] pdateValue
public java.lang.String[] pstringValue
public STCIDispatch[] pdispValue
public int[] perrorValue
public boolean[] pbooleanValue
public short[][] ppshortValue
public int[][] ppintValue
public float[][] ppfloatValue
public double[][] ppdoubleValue
public double[][] ppdateValue
public java.lang.String[][] ppstringValue
public int[][] pperrorValue
public boolean[][] ppbooleanValue
Constructor Detail |
---|
public STCComVariant()
public STCComVariant(boolean b)
b
- The Boolean value.
public STCComVariant(short s)
s
- The short value.
public STCComVariant(int i, int type) throws STCComException
i
- The int value.type
- The VT value from STCComVARTYPE.
STCComException
- Thrown if type is not valid.public STCComVariant(java.lang.String s)
s
- The String value.
public STCComVariant(STCIDispatch dispatch)
dispatch
- The STCIDispatch value.
public STCComVariant(float f)
f
- The float value.
public STCComVariant(double d, int type) throws STCComException
d
- The double value.type
- The double value.
STCComException
- Thrown if type is not valid.public STCComVariant(STCComVariant v)
v
- The STCComVariant value.
Method Detail |
---|
public int getVartype()
public void setVartype(int newVT)
newVT
- The VARTYPE of this STCComVariant instance.public boolean getIsByRef()
Boolean
- Returns the value of bIsByRef.
public void setIsByRef(boolean b)
b
- Set if byref or notpublic boolean getIsArray()
Boolean
- Returns the value of bIsArray.
public void setIsArray(boolean b)
b
- Sets if an array or not.public int getArrayDim()
int
- Returns the number of dimensions.
public void setArrayDim(int d) throws java.lang.IllegalArgumentException
d
- The number of dimensions. Must be 1 or 2. Any other value
will throw an exception.
java.lang.IllegalArgumentException
- Thrown if the value is not 1 or 2.public short getVT_I2() throws STCComException
short
- Returns the VT_I2 value.
STCComException
- Thrown on error.public void setVT_I2(short newValue)
newValue
- The new value.public int getVT_I4() throws STCComException
int
- Returns the VT_I4 value.
STCComException
- Thrown upon error.public void setVT_I4(int newValue)
newValue
- The new value.public float getVT_R4() throws STCComException
float
- Returns the VT_R4 value.
STCComException
- on error.public void setVT_R4(float newValue)
newValue
- The new value.public double getVT_R8() throws STCComException
double
- Returns the VT_R8 value.
STCComException
- on error.public void setVT_R8(double newValue)
newValue
- The new value.public double getVT_DATE() throws STCComException
double
- Returns the VT_DATE value.
STCComException
- Thrown upon error.public void setVT_DATE(double newValue)
newValue
- The new value.public java.lang.String getVT_BSTR() throws STCComException
String
- Returns the VT_BSTR value.
STCComException
- Thrown upon error.public void setVT_BSTR(java.lang.String newValue)
newValue
- The new value.public STCIDispatch getVT_DISPATCH() throws STCComException
STCIDispatch
- Returns the VT_DISPATCH value.
STCComException
- Thrown upon error.public void setVT_DISPATCH(STCIDispatch newValue)
newValue
- The new value.public int getVT_ERROR() throws STCComException
int
- Returns the VT_ERROR value.
STCComException
- Thrown upon error.public void setVT_ERROR(int newValue)
newValue
- The new value.public boolean getVT_BOOL() throws STCComException
Boolean
- Returns the VT_BOOL value.
STCComException
- Thrown upon error.public void setVT_BOOL(boolean newValue)
newValue
- The new value.public STCComVariant getVT_VARIANT() throws STCComException
STCComVariant
- Returns the VT_VARIANT value.
STCComException
- Thrown upon error.public void setVT_VARIANT(STCComVariant newValue)
newValue
- The new value.public short[] getVT_I2_1D() throws STCComException
short[]
- Returns the VT_I2_1D value.
STCComException
- Thrown upon error.public void setVT_I2_1D(short[] newValue)
newValue
- The new value.public int[] getVT_I4_1D() throws STCComException
int[]
- Returns the VT_I4_1D value.
STCComException
- Thrown upon error.public void setVT_I4_1D(int[] newValue)
newValue
- The new value.public float[] getVT_R4_1D() throws STCComException
float[]
- Returns the VT_R4_1D value.
STCComException
- Thrown upon error.public void setVT_R4_1D(float[] newValue)
newValue
- The new value.public double[] getVT_R8_1D() throws STCComException
double[]
- Returns the VT_R8_1D value.
STCComException
- Thrown upon error.public void setVT_R8_1D(double[] newValue)
newValue
- The new value.public double[] getVT_DATE_1D() throws STCComException
double[]
- Returns the VT_DATE_1D value.
STCComException
- Thrown upon error.public void setVT_DATE_1D(double[] newValue)
newValue
- The new value.public java.lang.String[] getVT_BSTR_1D() throws STCComException
String[]
- Returns the VT_BSTR_1D value.
STCComException
- Thrown upon error.public void setVT_BSTR_1D(java.lang.String[] newValue)
newValue
- The new value.public STCIDispatch[] getVT_DISPATCH_1D() throws STCComException
STCIDispatch[]
- Returns the VT_DISPATCH_1D value.
STCComException
- Thrown upon error.public void setVT_DISPATCH_1D(STCIDispatch[] newValue)
newValue
- The new value.public int[] getVT_ERROR_1D() throws STCComException
int[]
- Returns the VT_ERROR_1D value.
STCComException
- Thrown upon error.public void setVT_ERROR_1D(int[] newValue)
newValue
- The new value.public boolean[] getVT_BOOL_1D() throws STCComException
Boolean[]
- Returns the VT_BOOL_1D value.
STCComException
- Thrown upon error.public void setVT_BOOL_1D(boolean[] newValue)
newValue
- The new value.public short[][] getVT_I2_2D() throws STCComException
short[][]
- Returns the VT_I2_2D value.
STCComException
- Thrown upon error.public void setVT_I2_2D(short[][] newValue)
newValue
- The new value.public int[][] getVT_I4_2D() throws STCComException
int[][]
- Returns the VT_I4_2D value.
STCComException
- Thrown upon error.public void setVT_I4_2D(int[][] newValue)
newValue
- The new value.public double[][] getVT_R8_2D() throws STCComException
double[][]
- Returns the VT_R8_2D value.
STCComException
- Thrown upon error.public void setVT_R8_2D(double[][] newValue)
newValue
- The new value.public double[][] getVT_DATE_2D() throws STCComException
double[][]
- Returns the VT_DATE_2D value.
STCComException
- Thrown upon error.public void setVT_DATE_2D(double[][] newValue)
newValue
- The new value.public java.lang.String[][] getVT_BSTR_2D() throws STCComException
String[][]
- Returns the VT_BSTR_2D value.
STCComException
- Thrown upon error.public void setVT_BSTR_2D(java.lang.String[][] newValue)
newValue
- The new value.public int[][] getVT_ERROR_2D() throws STCComException
int[][]
- Returns the VT_ERROR_2D value.
STCComException
- Thrown upon error.public void setVT_ERROR_2D(int[][] newValue)
newValue
- The new value.public boolean[][] getVT_BOOL_2D() throws STCComException
Boolean[][]
- Returns the VT_BOOL_2D value.
STCComException
- Thrown upon error.public void setVT_BOOL_2D(boolean[][] newValue)
newValue
- The new value.public void clear()
|
Sun Adapter for COM/DCOM API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |