|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jinterop.dcom.core.JIArray
public final class JIArray
Represents an Array which can display Conformant\Standard behaviours.
Please make sure you supply completed and final Arrays (of Objects) to this class. Modifying the Array
after it has been passed to a JIArray (to subsequently be used in a DCOM call) will have unexpected results.
Please refer to MSExcel examples for more details on how to use this class.
Constructor Summary | |
---|---|
JIArray(java.lang.Class clazz,
int[] upperBounds,
int dimension,
boolean isConformant)
Creates an array Object of the type specified by clazz . |
|
JIArray(java.lang.Class clazz,
int[] upperBounds,
int dimension,
boolean isConformant,
boolean isVarying)
Creates an array Object of the type specified by clazz . |
|
JIArray(java.lang.Object array)
Creates a non conformant array object with array parameter as the nested Array. |
|
JIArray(java.lang.Object array,
boolean isConformant)
Creates an array object with array parameter as the nested Array. |
|
JIArray(java.lang.Object array,
boolean isConformant,
boolean isVarying)
Creates an array object with array parameter as the nested Array. |
|
JIArray(java.lang.Object template,
int[] upperBounds,
int dimension,
boolean isConformant)
Creates an array Object with members of the type template. |
|
JIArray(java.lang.Object template,
int[] upperBounds,
int dimension,
boolean isConformant,
boolean isVarying)
Creates an array Object with members of the type template. |
Method Summary | |
---|---|
java.lang.Class |
getArrayClass()
Class of the nested Array. |
java.lang.Object |
getArrayInstance()
Returns the nested Array. |
int |
getDimensions()
Returns the dimensions of the Array. |
int[] |
getUpperBounds()
Array of integers depicting Highest index for each dimension. |
boolean |
isConformant()
Status whether the array is Conformant or not. |
boolean |
isVarying()
Status whether the array is Varying or not. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JIArray(java.lang.Class clazz, int[] upperBounds, int dimension, boolean isConformant)
Creates an array Object of the type specified by clazz
. This is used
to prepare a template for decoding an array of that type. Used only for setting as an
OutParam in a JICallObject.
For example:-
This call creates a template for a single dimension Integer array of size 10.
JIArray array = new JIArray(Integer.class,new int[]{10},1,false);
This ctor is invoked when the developer wants to deserialize an array.
clazz
- Template for the Array.upperBounds
- Highest index for each dimension.dimension
- Number of dimensionsisConformant
- declares whether the array is conformant or not.public JIArray(java.lang.Class clazz, int[] upperBounds, int dimension, boolean isConformant, boolean isVarying)
Creates an array Object of the type specified by clazz
. This is used
to prepare a template for decoding an array of that type. Used only for setting as an
OutParam in a JICallObject.
For example:-
This call creates a template for a single dimension Integer array of size 10.
JIArray array = new JIArray(Integer.class,new int[]{10},1,false,false);
This ctor is invoked when the developer wants to deserialize an array.
clazz
- Template for the Array.upperBounds
- Highest index for each dimension.dimension
- Number of dimensionsisConformant
- declares whether the array is conformant or not.isVarying
- declares whether the array is varying or not.public JIArray(java.lang.Object template, int[] upperBounds, int dimension, boolean isConformant)
Creates an array Object with members of the type template. This API is exclusively for
composite types like JIStruct, JIPointer, JIUnion, JIString
data types.
Sample Usage:-
JIStruct safeArrayBounds = new JIStruct();
safeArrayBounds.addMember(Integer.class);
safeArrayBounds.addMember(Integer.class);
//arraydesc
JIStruct arrayDesc = new JIStruct();
//typedesc
JIStruct typeDesc = new JIStruct();
arrayDesc.addMember(typeDesc);
arrayDesc.addMember(Short.class);
arrayDesc.addMember(new JIArray(safeArrayBounds,new int[]{1},1,true));
This ctor is invoked when the developer wants to deserialize an array.
template
- Can be only of the type JIStruct, JIPointer, JIUnion and JIStringupperBounds
- Highest index for each dimension.dimension
- Number of dimensionsisConformant
- declares whether the array is conformant or not.public JIArray(java.lang.Object template, int[] upperBounds, int dimension, boolean isConformant, boolean isVarying)
Creates an array Object with members of the type template. This API is exclusively for
composite types like JIStruct, JIPointer, JIUnion, JIString
data types.
Sample Usage:-
JIStruct safeArrayBounds = new JIStruct();
safeArrayBounds.addMember(Integer.class);
safeArrayBounds.addMember(Integer.class);
//arraydesc
JIStruct arrayDesc = new JIStruct();
//typedesc
JIStruct typeDesc = new JIStruct();
arrayDesc.addMember(typeDesc);
arrayDesc.addMember(Short.class);
arrayDesc.addMember(new JIArray(safeArrayBounds,new int[]{1},1,true));
This ctor is invoked when the developer wants to deserialize an array.
template
- Can be only of the type JIStruct, JIPointer, JIUnion and JIStringupperBounds
- Highest index for each dimension.dimension
- Number of dimensionsisConformant
- declares whether the array is conformant or not.isVarying
- declares whether the array is varying or not.public JIArray(java.lang.Object array, boolean isConformant)
JIArray array = new JIArray(new JIPointer[]{new JIPointer(name)},true);
array
- Array of any type.isConformant
- declares whether the array is conformant or not.public JIArray(java.lang.Object array, boolean isConformant, boolean isVarying)
JIArray array = new JIArray(new JIPointer[]{new JIPointer(name)},true,true);
array
- Array of any type.isConformant
- declares whether the array is conformant or not.isVarying
- declares whether the array is varying or not.public JIArray(java.lang.Object array)
JIArray array = new JIArray(new Integer[]{new Integer(1)});
array
- Array of any type.Method Detail |
---|
public java.lang.Object getArrayInstance()
public java.lang.Class getArrayClass()
public int[] getUpperBounds()
public int getDimensions()
public boolean isConformant()
true
is array is conformant.public boolean isVarying()
true
is array is Varying.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 |