public abstract class TClrBase extends java.lang.Object implements IClrBase, java.lang.AutoCloseable
Modifier | Constructor and Description |
---|---|
protected |
TClrBase()
Initializes a new instance of the TClrBase class.
|
protected |
TClrBase(DotNetNativeTypes.ClrObject clrObject)
Initializes a new instance of the TClrBase class with the specified clr object pointer.
|
Modifier and Type | Method and Description |
---|---|
protected void |
clearRef(java.util.Map map,
java.lang.Class elementClass) |
void |
close() |
boolean |
equals(IClrBase baseObject)
Determines whether the specified object is equal to the current object.
|
DotNetNativeTypes.ClrObject |
getBaseObject()
Gets the default clr object pointer.
|
protected abstract DotNetNativeTypes.ClrObject |
getClrObject()
Gets the base clr object pointer.
|
java.lang.Object |
getFieldValue(java.lang.String fieldName)
Returns the value of a field with the specified name.
|
java.lang.Object |
getPropertyIndexValue(java.lang.String propertyName,
int Index)
Returns the property value of a specified object with specified property name and index value for indexed properties.
|
java.lang.Object |
getPropertyIndexValue(java.lang.String propertyName,
java.lang.String[] typeNames,
java.lang.Object[] indices)
Searches for the public property with the specified name and returns the property index value of a specified indexer object.
|
java.lang.Object |
getPropertyValue(java.lang.String propertyName)
Returns the property value of a specified object using the specified property name.
|
IClrType |
getType()
Gets the exact runtime type of the current instance.
|
protected DotNetNativeTypes.ClrObject |
invokeGenericClrObjectMethod(java.lang.String methodName,
java.lang.String[] genericTypeNames,
java.lang.String[] ParameterTypeNames,
java.lang.Object[] parameters) |
java.lang.Object |
invokeGenericMethod(java.lang.String methodName,
java.lang.String[] genericTypeNames,
java.lang.String[] ParameterTypeNames,
java.lang.Object[] parameters)
Invokes the generic method represented by the current object instance,using the specified parameters.
|
java.lang.Object |
invokeMethod(java.lang.String methodName,
java.lang.String[] typeNames,
java.lang.Object[] parameters)
Invokes the method represented by the current object instance, using thespecified parameters.
|
void |
invokeVoidMethod(java.lang.String methodName,
java.lang.String[] typeNames,
java.lang.Object[] parameters)
Invokes the method represented by the current object instance, using the specified parameters and does not return any value.
|
protected void |
registerEvent()
Register the source of the event
|
void |
registerEventCallBack(java.lang.String eventName,
DotNetNativeTypes.IClrEventHandler callBack)
Add an event to the current object using the specified event name and function pointer which is the event handler.
|
void |
registerEventCallBackWithReturn(java.lang.String eventName,
DotNetNativeTypes.IClrEventHandlerReturn callBack)
Add an event to the current object using the specified event name and function pointer which is the event handler.
|
void |
setFieldValue(java.lang.String fieldName,
java.lang.Object value)
Sets the value of the field with the specified name supported by the given object.
|
void |
setPropertyIndexValue(java.lang.String propertyName,
int Index,
java.lang.Object value)
Sets the property value of a specified object with property name andindex value for index properties.
|
void |
setPropertyIndexValue(java.lang.String propertyName,
java.lang.String[] typeNames,
java.lang.Object[] indices,
java.lang.Object value)
Sets the property value of a specified object with optional index values for index properties.
|
void |
setPropertyValue(java.lang.String propertyName,
java.lang.Object value)
Sets the property value of a specified object using the specified property name.
|
protected void |
unRegisterEvent()
UnRegister the source of the event
|
void |
unRegisterEventCallBack(java.lang.String eventName,
DotNetNativeTypes.IClrEventHandler callBack)
Remove an event from the current object using the specified event name and function pointer which is the event handler.
|
void |
unRegisterEventCallBackWithReturn(java.lang.String eventName,
DotNetNativeTypes.IClrEventHandlerReturn callBack)
Remove an event from the current object using the specified event name and function pointer which is the event handler.
|
protected TClrBase()
protected TClrBase(DotNetNativeTypes.ClrObject clrObject)
clrObject
- Specifies clr object pointerprotected abstract DotNetNativeTypes.ClrObject getClrObject() throws EClrError
EClrError
protected void registerEvent() throws EClrError
EClrError
protected void unRegisterEvent()
public void close() throws java.lang.Exception
close
in interface java.lang.AutoCloseable
java.lang.Exception
public DotNetNativeTypes.ClrObject getBaseObject() throws EClrError
getBaseObject
in interface IClrBase
EClrError
public IClrType getType() throws EClrError
public boolean equals(IClrBase baseObject) throws EClrError
public java.lang.Object getFieldValue(java.lang.String fieldName) throws EClrError
getFieldValue
in interface IClrBase
fieldName
- The string containing the name of the data field to get.EClrError
public void setFieldValue(java.lang.String fieldName, java.lang.Object value) throws EClrError
setFieldValue
in interface IClrBase
fieldName
- The string containing the name of the data field to get.value
- The value to assign to the field.EClrError
public java.lang.Object getPropertyValue(java.lang.String propertyName) throws EClrError
getPropertyValue
in interface IClrBase
propertyName
- The string containing the name of the public property to get.EClrError
public void setPropertyValue(java.lang.String propertyName, java.lang.Object value) throws EClrError
setPropertyValue
in interface IClrBase
propertyName
- The string containing the name of the public property to get.value
- The new property value.EClrError
public java.lang.Object getPropertyIndexValue(java.lang.String propertyName, int Index) throws EClrError
getPropertyIndexValue
in interface IClrBase
propertyName
- The string containing the name of the public property to get.Index
- Index value for indexed properties. The indexes of indexed properties are zero-based.EClrError
public java.lang.Object getPropertyIndexValue(java.lang.String propertyName, java.lang.String[] typeNames, java.lang.Object[] indices) throws EClrError
getPropertyIndexValue
in interface IClrBase
propertyName
- The string containing the name of the public property to get.typeNames
- An array of Type objects names representing the number, order, and type of the parameters for the indexed property to get.indices
- Index values for indexed properties.EClrError
public void setPropertyIndexValue(java.lang.String propertyName, int Index, java.lang.Object value) throws EClrError
setPropertyIndexValue
in interface IClrBase
propertyName
- The string containing the name of the public property to get.Index
- Index value for indexed properties.value
- The new property value.EClrError
public void setPropertyIndexValue(java.lang.String propertyName, java.lang.String[] typeNames, java.lang.Object[] indices, java.lang.Object value) throws EClrError
setPropertyIndexValue
in interface IClrBase
propertyName
- The string containing the name of the public property to get.typeNames
- An array of Type objects names representing the number, order, and type of the parameters for the indexed property to get.indices
- Index values for indexed properties.value
- The new property value.EClrError
public void invokeVoidMethod(java.lang.String methodName, java.lang.String[] typeNames, java.lang.Object[] parameters) throws EClrError
invokeVoidMethod
in interface IClrBase
methodName
- The string containing the name of the public method to get.typeNames
- The names of the method parameter types separated by commas or semi-colon. The names of the parameter types has the same number,
order as the parameters of the method to be invoked.parameters
- An argument list for the invoked method. This is an array of objects with the same number, order, and type as the parameters of the method to be invoked.EClrError
public java.lang.Object invokeMethod(java.lang.String methodName, java.lang.String[] typeNames, java.lang.Object[] parameters) throws EClrError
invokeMethod
in interface IClrBase
methodName
- The string containing the name of the public method to get.typeNames
- The names of the method parameter types separated by commas or semi-colon. The names of the parameter types has the same number, order as the parameters of the method to be invoked.parameters
- An argument list for the invoked method. This is an array of objects with the same number, order, and type as the parameters of the method to be invoked.EClrError
protected DotNetNativeTypes.ClrObject invokeGenericClrObjectMethod(java.lang.String methodName, java.lang.String[] genericTypeNames, java.lang.String[] ParameterTypeNames, java.lang.Object[] parameters) throws EClrError
methodName
- genericTypeNames
- ParameterTypeNames
- parameters
- EClrError
public java.lang.Object invokeGenericMethod(java.lang.String methodName, java.lang.String[] genericTypeNames, java.lang.String[] ParameterTypeNames, java.lang.Object[] parameters) throws EClrError
invokeGenericMethod
in interface IClrBase
methodName
- The string containing the name of the public generic 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.ParameterTypeNames
- The names of the method parameter types separated by commas or semi-colon. The names of the parameter types has the same number, order as the parameters of the method to be invoked.parameters
- An argument list for the invoked method. This is an array of objects with the same number, order, and type as the parameters of the method to be invoked.EClrError
public void registerEventCallBack(java.lang.String eventName, DotNetNativeTypes.IClrEventHandler callBack) throws EClrError
registerEventCallBack
in interface IClrBase
eventName
- The string containing the name of an event that is declaredcallBack
- Encapsulates a method to be invoked when the event is raised by the current object.EClrError
public void registerEventCallBackWithReturn(java.lang.String eventName, DotNetNativeTypes.IClrEventHandlerReturn callBack) throws EClrError
registerEventCallBackWithReturn
in interface IClrBase
eventName
- The string containing the name of an event that is declaredcallBack
- Encapsulates a method to be invoked when the event is raised by the current object.EClrError
public void unRegisterEventCallBack(java.lang.String eventName, DotNetNativeTypes.IClrEventHandler callBack) throws EClrError
unRegisterEventCallBack
in interface IClrBase
eventName
- The string containing the name of an event that is declared.callBack
- The delegate to be disassociated from the events raised by current object.EClrError
public void unRegisterEventCallBackWithReturn(java.lang.String eventName, DotNetNativeTypes.IClrEventHandlerReturn callBack) throws EClrError
unRegisterEventCallBackWithReturn
in interface IClrBase
eventName
- The string containing the name of an event that is declared.callBack
- The delegate to be disassociated from the events raised by current object.EClrError
protected final void clearRef(java.util.Map map, java.lang.Class elementClass)