public interface IClrObject extends IClrBase
Modifier and Type | Method and Description |
---|---|
<T> T |
AsType(java.lang.Class<T> type)
Casts the currently stored .Net value to another type.
|
<TResult extends TClrBase> |
CastTo(java.lang.Object source,
IClrType type,
java.lang.Class<TResult> returnClass)
Cast the object to the specified type.
|
<TResult extends TClrBase> |
CastTo(java.lang.Object source,
java.lang.String typeName,
java.lang.Class<TResult> returnClass)
Cast the object to the specified type.
|
java.lang.Object |
getArrayElement(int index)
Gets the value at the specified position in the one-dimensional Array.
|
int |
getArrayLength()
Gets the array length if the stored value is an array.
|
DotNetNativeTypes.ClrObject |
getDefaultPointer()
Gets the default clr object pointer.
|
<T> T |
getFieldValue(java.lang.String fieldName,
java.lang.Class<T> returnClass) |
java.lang.String |
getObjectAsString()
Gets a string that represents the current object.
|
<T> T |
getPropertyIndexValue(java.lang.String propertyName,
int index,
java.lang.Class<T> returnClass) |
<T> T |
getPropertyValue(java.lang.String propertyName,
java.lang.Class<T> returnClass) |
TypeCode |
getTypeCode()
Gets the TypeCode for the specified object.
|
java.lang.Object |
invokeGenericMethod(java.lang.String methodName,
java.lang.String[] GenericTypeNames)
Invokes the generic method represented by the current object instance,using the specified parameters.
|
<T> T |
invokeGenericMethod(java.lang.String methodName,
java.lang.String[] GenericTypeNames,
java.lang.Class<T> returnClass) |
<T> T |
invokeGenericMethod(java.lang.String methodName,
java.lang.String[] GenericTypeNames,
java.lang.String[] typeNames,
java.lang.Object[] parameters,
java.lang.Class<T> returnClass) |
java.lang.Object |
invokeMethod(java.lang.String methodName)
Invokes the method represented by the current object instance, using the specified parameters.
|
<T> T |
invokeMethod(java.lang.String methodName,
java.lang.Class<T> returnClass) |
<T> T |
invokeMethod(java.lang.String methodName,
java.lang.String[] typeNames,
java.lang.Object[] parameters,
java.lang.Class<T> returnClass) |
void |
invokeVoidMethod(java.lang.String methodName)
Invokes the method represented by the current object instance, using the specified parameters and does not return any value.
|
boolean |
isArray()
Gets a boolean value that indicates whether the type is an array.
|
boolean |
isEnum()
Gets a boolean value indicating whether the current Type represents an enumeration.
|
boolean |
isGeneric()
Gets a boolean value indicating whether the current type is a generic type.
|
boolean |
isStatic()
Gets a boolean value indicating whether the current type is a static type.
|
void |
setArrayElement(int index,
java.lang.Object value)
Sets a value to the element at the specified position in the one-dimensional Array.
|
IClrArray |
toArray()
Gets an array that represents the current object.
|
java.lang.Object |
toObject()
Gets a java object that represents the current object.
|
java.lang.Object |
unWrap() |
equals, getBaseObject, getFieldValue, getPropertyIndexValue, getPropertyIndexValue, getPropertyValue, getType, invokeGenericMethod, invokeMethod, invokeVoidMethod, registerEventCallBack, registerEventCallBackWithReturn, setFieldValue, setPropertyIndexValue, setPropertyIndexValue, setPropertyValue, unRegisterEventCallBack, unRegisterEventCallBackWithReturn
DotNetNativeTypes.ClrObject getDefaultPointer()
boolean isStatic() throws EClrError
EClrError
boolean isGeneric() throws EClrError
EClrError
boolean isArray() throws EClrError
EClrError
boolean isEnum() throws EClrError
EClrError
TypeCode getTypeCode() throws EClrError
EClrError
java.lang.String getObjectAsString() throws EClrError
EClrError
java.lang.Object toObject() throws EClrError
EClrError
IClrArray toArray() throws EClrError
EClrError
int getArrayLength() throws EClrError
EClrError
java.lang.Object getArrayElement(int index) throws EClrError
index
- A 32-bit integer that represents the position of the Array element to get.EClrError
void setArrayElement(int index, java.lang.Object value) throws EClrError
index
- A 32-bit integer that represents the position of the Array element to set.value
- The new value for the specified element.EClrError
<T> T getFieldValue(java.lang.String fieldName, java.lang.Class<T> returnClass) throws java.lang.Exception
T
- fieldName
- returnClass
- java.lang.Exception
<T> T getPropertyValue(java.lang.String propertyName, java.lang.Class<T> returnClass) throws java.lang.Exception
T
- propertyName
- returnClass
- java.lang.Exception
<T> T getPropertyIndexValue(java.lang.String propertyName, int index, java.lang.Class<T> returnClass) throws java.lang.Exception
T
- propertyName
- index
- returnClass
- java.lang.Exception
void invokeVoidMethod(java.lang.String methodName) throws EClrError
methodName
- The string containing the name of the public method to get.EClrError
<T> T invokeMethod(java.lang.String methodName, java.lang.Class<T> returnClass) throws java.lang.Exception
T
- methodName
- returnClass
- EClrError
java.lang.Exception
java.lang.Object invokeMethod(java.lang.String methodName) throws EClrError
methodName
- The string containing the name of the public method to get.EClrError
<T> T invokeMethod(java.lang.String methodName, java.lang.String[] typeNames, java.lang.Object[] parameters, java.lang.Class<T> returnClass) throws java.lang.Exception
T
- methodName
- typeNames
- parameters
- returnClass
- EClrError
java.lang.Exception
<T> T invokeGenericMethod(java.lang.String methodName, java.lang.String[] GenericTypeNames, java.lang.Class<T> returnClass) throws java.lang.Exception
T
- methodName
- GenericTypeNames
- returnClass
- EClrError
java.lang.Exception
<T> T invokeGenericMethod(java.lang.String methodName, java.lang.String[] GenericTypeNames, java.lang.String[] typeNames, java.lang.Object[] parameters, java.lang.Class<T> returnClass) throws java.lang.Exception
T
- methodName
- GenericTypeNames
- typeNames
- parameters
- returnClass
- java.lang.Exception
java.lang.Object invokeGenericMethod(java.lang.String methodName, java.lang.String[] GenericTypeNames) throws EClrError
methodName
- The string containing the name of the public method to get.GenericTypeNames
- The names of the types separated by commas or semi-colon which will be substituted for the type parameters of the current object generic method definition.EClrError
java.lang.Object unWrap() throws EClrError
EClrError
<TResult extends TClrBase> TResult CastTo(java.lang.Object source, java.lang.String typeName, java.lang.Class<TResult> returnClass) throws java.lang.Exception
TResult
- The IClrObject typesource
- The Object to be cast to the specified type.typeName
- The type to cast the source to.returnClass
- The Java class of type IClrObject which will be created to hold reference to the cast .Net object.java.lang.Exception
<TResult extends TClrBase> TResult CastTo(java.lang.Object source, IClrType type, java.lang.Class<TResult> returnClass) throws java.lang.Exception
TResult
- The IClrObject Typesource
- The object to be casted.type
- The type of the .Net object to be converted to.returnClass
- The Java class of type IClrObject which will be created to hold reference to the cast .Net object.java.lang.Exception
<T> T AsType(java.lang.Class<T> type) throws java.lang.Exception
T
- type
- The type to be converted to.java.lang.Exception