T
- public class TClrGenericArray<T> extends TClrArray implements IClrGenericArray<T>
Constructor and Description |
---|
TClrGenericArray(java.lang.Class<T> elementClazz,
DotNetNativeTypes.ClrObject object)
Initializes a new instance of the TClrGenericArray class of the specified Class and clr Object pointer.
|
TClrGenericArray(java.lang.Class<T> elementClazz,
int length)
Initializes a new instance of the TClrGenericArray class of the specified Class and length.
|
TClrGenericArray(java.lang.Class<T> elementClazz,
int length,
java.lang.String... genericArgumentTypes)
Initializes a new instance of the TClrGenericArray class of the specified Class and length.
|
TClrGenericArray(DotNetNativeTypes.ClrArray array,
java.lang.Class<T> elementClazz)
Initializes a new instance of the TClrGenericArray class of the specified Class and clr Array pointer.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
static <T> IClrGenericArray<T> |
createInstance(DotNetNativeTypes.ClrObject paramObject,
java.lang.Class<T> clazz)
Initializes a new instance of the TClrGenericArray class of the specified Class and clr Object pointer.
|
static <T> IClrGenericArray<T> |
createInstance(java.lang.Object paramObject,
java.lang.Class<T> clazz)
Initializes a new instance of the TClrGenericArray class of the specified Class and an object.
|
T |
get(int index)
Gets the value at the specified position in the one-dimensional Array.
|
DotNetNativeTypes.ClrArray |
getDefaultPointer()
Gets the default clr array pointer.
|
java.lang.Class<?> |
getElementClass()
Gets statically defined returned type.
|
void |
reset()
Clear the content of the array.
|
void |
set(T value,
int index)
Sets a value to the element at the specified position in the one-dimensional Array.
|
void |
setValue(java.lang.Object value,
int index)
Sets a value to the element at the specified position in the one-dimensional Array.
|
T[] |
toArray()
Copies the elements of the IClrGenericArray to a new array.
|
createAssemblyArray, createBooleanArray, createByteArray, createClrArray, createDateTimeArray, createDecimalArray, createDoubleArray, createFloatArray, createInstance, createInstance, createIntArray, createLongArray, createObjectArray, createSByteArray, createShortArray, createStringArray, createTypeArray, emptyObjectArray, getClrObject, getElementType, getLength, getStaticArray, getType, getValue, getValue, indexOf, of, of, setValue, toClrObject, toObjectArray
clearRef, equals, getBaseObject, getFieldValue, getPropertyIndexValue, getPropertyIndexValue, getPropertyValue, invokeGenericClrObjectMethod, invokeGenericMethod, invokeMethod, invokeVoidMethod, registerEvent, registerEventCallBack, registerEventCallBackWithReturn, setFieldValue, setPropertyIndexValue, setPropertyIndexValue, setPropertyValue, unRegisterEvent, unRegisterEventCallBack, unRegisterEventCallBackWithReturn
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getElementType, getLength, getType, getValue, indexOf, New, toClrObject
equals, getBaseObject, getFieldValue, getPropertyIndexValue, getPropertyIndexValue, getPropertyValue, invokeGenericMethod, invokeMethod, invokeVoidMethod, registerEventCallBack, registerEventCallBackWithReturn, setFieldValue, setPropertyIndexValue, setPropertyIndexValue, setPropertyValue, unRegisterEventCallBack, unRegisterEventCallBackWithReturn
public TClrGenericArray(java.lang.Class<T> elementClazz, DotNetNativeTypes.ClrObject object) throws EClrError
elementClazz
- The class of the Array to create.object
- The clr object pointer which represents a pointer to a clr array.EClrError
public TClrGenericArray(java.lang.Class<T> elementClazz, int length) throws java.lang.Exception
elementClazz
- The class of the Array to create.length
- The size of the Array to create.EClrError
java.lang.Exception
public TClrGenericArray(java.lang.Class<T> elementClazz, int length, java.lang.String... genericArgumentTypes) throws java.lang.Exception
elementClazz
- The class of the Array to create.length
- The size of the Array to create.EClrError
java.lang.Exception
public TClrGenericArray(DotNetNativeTypes.ClrArray array, java.lang.Class<T> elementClazz) throws EClrError
array
- The clr array pointer.elementClazz
- The class of the Array to create.EClrError
public static <T> IClrGenericArray<T> createInstance(DotNetNativeTypes.ClrObject paramObject, java.lang.Class<T> clazz) throws java.lang.Exception
T
- clazz
- The class of the Array to create.paramObject
- The clr object pointer which represents a pointer to a clr array.java.lang.Exception
public static <T> IClrGenericArray<T> createInstance(java.lang.Object paramObject, java.lang.Class<T> clazz) throws java.lang.Exception
T
- clazz
- The class of the Array to create.paramObject
- The Java object which is of type array or clr pointer.java.lang.Exception
public void close() throws java.lang.Exception
public DotNetNativeTypes.ClrArray getDefaultPointer()
getDefaultPointer
in interface IClrArray
getDefaultPointer
in interface IClrGenericArray<T>
getDefaultPointer
in class TClrArray
public java.lang.Class<?> getElementClass()
getElementClass
in interface IClrGenericArray<T>
public T get(int index) throws java.lang.Exception
get
in interface IClrGenericArray<T>
index
- A 32-bit integer that represents the position of the Array element to get.java.lang.Exception
public void set(T value, int index) throws EClrError
set
in interface IClrGenericArray<T>
value
- The new value for the specified element.index
- A 32-bit integer that represents the position of the Array element to set.EClrError
public void reset() throws java.lang.Exception
reset
in interface IClrGenericArray<T>
java.lang.Exception
public T[] toArray() throws java.lang.Exception
toArray
in interface IClrGenericArray<T>
java.lang.Exception
public void setValue(java.lang.Object value, int index) throws EClrError