Interface IJavaType
- Namespace
- MASES.JCOBridge.C2JBridge.JVMInterop
- Assembly
- C2JBridge.dll
Generic interface for all types implemented
public interface IJavaType : IDisposable
- Inherited Members
- Extension Methods
Properties
IsArray
bool IsArray { get; }
Property Value
IsPrimitiveConvertible
bool IsPrimitiveConvertible { get; }
Property Value
IsRawPrimitive
bool IsRawPrimitive { get; }
Property Value
JniClassName
The name in the JNI form
string JniClassName { get; }
Property Value
Name
The type name
string Name { get; }
Property Value
SuperClass
IJavaType SuperClass { get; }
Property Value
Methods
GetField(string)
Gets a static field
object GetField(string fieldName)
Parameters
fieldName
stringThe field name to get
Returns
- object
The field value
GetField<TReturn>(string)
Gets a static field
TReturn GetField<TReturn>(string fieldName)
Parameters
fieldName
stringThe field name to get
Returns
- TReturn
The field value
Type Parameters
TReturn
The return type expected: IJavaObject, Enum or primitive types
Invoke(string, params object[])
Invokes a static member on this IJavaType using methodName
and search criteria based on args
object Invoke(string methodName, params object[] args)
Parameters
Returns
- object
The return value of Invoke(string, params object[])
InvokeWithSignature(string, string, params object[])
Invokes a static member on this IJavaType using methodName
and search criteria based on signature
object InvokeWithSignature(string methodName, string signature, params object[] args)
Parameters
methodName
stringThe method name to invoke
signature
stringThe method signature to be used
args
object[]The arguments to pass to the method
Returns
- object
The return value of InvokeWithSignature(string, string, params object[])
InvokeWithSignature<TReturn>(string, string, params object[])
Invokes a static member on this IJavaType using methodName
and search criteria based on signature
TReturn InvokeWithSignature<TReturn>(string methodName, string signature, params object[] args)
Parameters
methodName
stringThe method name to invoke
signature
stringThe method signature to be used
args
object[]The arguments to pass to the method
Returns
- TReturn
The return value of InvokeWithSignature<TReturn>(string, string, params object[])
Type Parameters
TReturn
The return type expected: IJavaObject, Enum, primitive types or array of primitives types
Invoke<TReturn>(string, params object[])
Invokes a static member on this IJavaType using methodName
and search criteria based on args
TReturn Invoke<TReturn>(string methodName, params object[] args)
Parameters
Returns
- TReturn
The return value of Invoke<TReturn>(string, params object[])
Type Parameters
TReturn
The return type expected: IJavaObject, Enum, primitive types or array of primitives types
New(params object[])
Creates a new object of this IJavaType with search criteria based on args
IJavaObject New(params object[] args)
Parameters
args
object[]The arguments for the constructor
Returns
- IJavaObject
An instance of IJavaObject
NewWithSignature(string, params object[])
Creates a new object of this IJavaType with search criteria based on signature
IJavaObject NewWithSignature(string signature, params object[] args)
Parameters
signature
stringThe constructor signature to be used
args
object[]The arguments for the constructor
Returns
- IJavaObject
An instance of IJavaObject
SetField(string, object)
Sets a static field
void SetField(string fieldName, object val)