public class TClrArray extends TClrBase implements IClrArray
Modifier | Constructor and Description |
---|---|
|
TClrArray(DotNetNativeTypes.ClrArray array)
Create an instance of a one-dimensional Array from the clr array pointer.
|
|
TClrArray(DotNetNativeTypes.ClrObject clrObject)
Create an instance of a one-dimensional Array from the clr Object pointer which represents a pointer to a clr array.
|
protected |
TClrArray(DotNetNativeTypes.ClrType elementType,
int length)
Creates a one-dimensional Array of the specified Type and length, with zero-based indexing.
|
protected |
TClrArray(IClrType elementType,
int length)
Creates a one-dimensional Array of the specified Type and length, with zero-based indexing.
|
protected |
TClrArray(java.lang.String elementTypeName,
int length)
Creates a one-dimensional Array of the specified Type and length, with zero-based indexing.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
static IClrArray |
createAssemblyArray(int length)
Creates a one-dimensional Array of Assembly with the specified length, using zero-based indexing.
|
static IClrArray |
createBooleanArray(int length)
Creates a one-dimensional Array of boolean with the specified length, using zero-based indexing.
|
static IClrArray |
createByteArray(int length)
Creates a one-dimensional Array of byte with the specified length, using zero-based indexing.
|
static DotNetNativeTypes.ClrArray |
createClrArray(java.lang.Class<?> arrayElementType,
int length) |
static IClrArray |
createDateTimeArray(int length)
Creates a one-dimensional Array of clr DateTime with the specified length, using zero-based indexing.
|
static IClrArray |
createDecimalArray(int length)
Creates a one-dimensional Array of clr Decimal with the specified length, using zero-based indexing.
|
static IClrArray |
createDoubleArray(int length)
Creates a one-dimensional Array of double with the specified length, using zero-based indexing.
|
static IClrArray |
createFloatArray(int length)
Creates a one-dimensional Array of float with the specified length, using zero-based indexing.
|
static IClrArray |
createInstance(IClrType elementType,
int length)
Creates a one-dimensional Array of the specified Type and length, with zero-based indexing.
|
static IClrArray |
createInstance(java.lang.String elementTypeName,
int length)
Creates a one-dimensional Array of the specified Type and length, with zero-based indexing.
|
static IClrArray |
createIntArray(int length)
Creates a one-dimensional Array of integer with the specified length, using zero-based indexing.
|
static IClrArray |
createLongArray(int length)
Creates a one-dimensional Array of long with the specified length, using zero-based indexing.
|
static IClrArray |
createObjectArray(int length)
Creates a one-dimensional Array of .Net object with the specified length, using zero-based indexing.
|
static IClrArray |
createSByteArray(int length)
Creates a one-dimensional Array of sbyte/byte with the specified length, using zero-based indexing.
|
static IClrArray |
createShortArray(int length)
Creates a one-dimensional Array of short with the specified length, using zero-based indexing.
|
static IClrArray |
createStringArray(int length)
Creates a one-dimensional Array of string with the specified length, using zero-based indexing.
|
static IClrArray |
createTypeArray(int length)
Creates a one-dimensional Array of Type with the specified length, using zero-based indexing.
|
static java.lang.Object[] |
emptyObjectArray() |
protected DotNetNativeTypes.ClrObject |
getClrObject()
Gets the base clr object pointer.
|
DotNetNativeTypes.ClrArray |
getDefaultPointer()
Gets the default clr array pointer.
|
IClrType |
getElementType()
Returns the Type of the object encompassed or referred to by the current array, pointer or reference type.
|
int |
getLength()
Gets the total number of elements in all the dimensions of the Array; zero if there are no elements in the array.
|
protected DotNetNativeTypes.ClrObject |
getStaticArray()
Create a static .Net System.Array object type.
|
IClrType |
getType()
Gets the exact runtime type of the current instance.
|
protected <T> T |
getValue(java.lang.Class<T> clazz,
int index)
Gets the element at the specified index.
|
java.lang.Object |
getValue(int index)
Gets the value at the specified position in the one-dimensional Array.
|
int |
indexOf(java.lang.Object value)
Searches for the specified object and returns the index of its first occurrence in a one-dimensional array.
|
static java.lang.Object[] |
of(java.lang.Object... paramArray)
Converts an Object params to an array of Object.
|
static java.lang.String[] |
of(java.lang.String... paramArray)
Converts a String params to an array of String.
|
protected void |
setValue(java.lang.Class<?> clazz,
java.lang.Object value,
int index)
Sets the element at the specified index.
|
void |
setValue(java.lang.Object value,
int index)
Sets a value to the element at the specified position in the one-dimensional Array.
|
DotNetNativeTypes.ClrObject |
toClrObject()
Gets the Clr base object Converts the value of the Array to a base object.
|
static <T> T[] |
toObjectArray(DotNetNativeTypes.ClrArray clrArray,
java.lang.Class<T> componentClass) |
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
equals, getBaseObject, getFieldValue, getPropertyIndexValue, getPropertyIndexValue, getPropertyValue, invokeGenericMethod, invokeMethod, invokeVoidMethod, registerEventCallBack, registerEventCallBackWithReturn, setFieldValue, setPropertyIndexValue, setPropertyIndexValue, setPropertyValue, unRegisterEventCallBack, unRegisterEventCallBackWithReturn
protected TClrArray(IClrType elementType, int length) throws EClrError
elementType
- The Type of the Array to create.length
- The size of the Array to create.EClrError
protected TClrArray(DotNetNativeTypes.ClrType elementType, int length) throws EClrError
elementType
- The Clr Type pointer of the Array to create.length
- The size of the Array to create.EClrError
protected TClrArray(java.lang.String elementTypeName, int length) throws EClrError
elementTypeName
- length
- The size of the Array to create.EClrError
public TClrArray(DotNetNativeTypes.ClrObject clrObject) throws EClrError
clrObject
- The clr object pointer which represents a pointer to a clr array.EClrError
public TClrArray(DotNetNativeTypes.ClrArray array)
array
- The clr array pointer.public static final IClrArray createInstance(java.lang.String elementTypeName, int length) throws EClrError
elementTypeName
- The Type name of the Array to create.length
- The size of the Array to create.EClrError
public static final IClrArray createInstance(IClrType elementType, int length) throws EClrError
elementType
- The Type of the Array to create.length
- The size of the Array to create.EClrError
public static final IClrArray createObjectArray(int length) throws EClrError
length
- The size of the Array to create.EClrError
public static final IClrArray createBooleanArray(int length) throws EClrError
length
- The size of the Array to create.EClrError
public static final IClrArray createSByteArray(int length) throws EClrError
length
- The size of the Array to create.EClrError
public static final IClrArray createByteArray(int length) throws EClrError
length
- The size of the Array to create.EClrError
public static final IClrArray createIntArray(int length) throws EClrError
length
- The size of the Array to create.EClrError
public static final IClrArray createShortArray(int length) throws EClrError
length
- The size of the Array to create.EClrError
public static final IClrArray createLongArray(int length) throws EClrError
length
- The size of the Array to create.EClrError
public static final IClrArray createFloatArray(int length) throws EClrError
length
- The size of the Array to create.EClrError
public static final IClrArray createStringArray(int length) throws EClrError
length
- The size of the Array to create.EClrError
public static final IClrArray createDoubleArray(int length) throws EClrError
length
- The size of the Array to create.EClrError
public static final IClrArray createDateTimeArray(int length) throws EClrError
length
- The size of the Array to create.EClrError
public static final IClrArray createDecimalArray(int length) throws EClrError
length
- The size of the Array to create.EClrError
public static final IClrArray createTypeArray(int length) throws EClrError
length
- The size of the Array to create.EClrError
public static final IClrArray createAssemblyArray(int length) throws EClrError
length
- The size of the Array to create.EClrError
public static final java.lang.String[] of(java.lang.String... paramArray)
paramArray
- A String params argument to be converted.public static final java.lang.Object[] of(java.lang.Object... paramArray)
paramArray
- An Object params argument to be converted.public static <T> T[] toObjectArray(DotNetNativeTypes.ClrArray clrArray, java.lang.Class<T> componentClass) throws java.lang.Exception
T
- clrArray
- componentClass
- java.lang.Exception
public static final DotNetNativeTypes.ClrArray createClrArray(java.lang.Class<?> arrayElementType, int length) throws EClrError
arrayElementType
- length
- EClrError
public static final java.lang.Object[] emptyObjectArray()
protected DotNetNativeTypes.ClrObject getClrObject() throws EClrError
getClrObject
in class TClrBase
EClrError
public void close() throws java.lang.Exception
protected DotNetNativeTypes.ClrObject getStaticArray() throws EClrError
EClrError
public DotNetNativeTypes.ClrArray getDefaultPointer()
getDefaultPointer
in interface IClrArray
public int getLength() throws EClrError
protected <T> T getValue(java.lang.Class<T> clazz, int index) throws java.lang.Exception
T
- The element at the specified index.clazz
- The class of the element to get.index
- The zero-based index of the element to get.EClrError
java.lang.Exception
public java.lang.Object getValue(int index) throws EClrError
public int indexOf(java.lang.Object value) throws EClrError
protected void setValue(java.lang.Class<?> clazz, java.lang.Object value, int index) throws EClrError
clazz
- The class of the element to set.value
- The new value for the specified element.index
- The zero-based index of the element to set.EClrError
public void setValue(java.lang.Object value, int index) throws EClrError
public IClrType getElementType() throws EClrError
getElementType
in interface IClrArray
EClrError
public DotNetNativeTypes.ClrObject toClrObject() throws EClrError
toClrObject
in interface IClrArray
EClrError