Click or drag to resize

IJavaObjectGetFieldTReturn(String) Method

Reads the value of an instance field on the underlying JVM object and casts it to TReturn.

Namespace: MASES.JCOBridge.C2JBridge.JVMInterop
Assembly: C2JBridge (in C2JBridge.dll) Version: 2.6.9.260611-9a148513a79c26cdd7f1dde468f4f9e06ef3bc7e
Syntax
TReturn GetField<TReturn>(
	string fieldName
)

Parameters

fieldName  String
The name of the Java instance field to read.

Type Parameters

TReturn
The expected field type. Supported types: IJavaObject or any derived interface/class, .NET primitive types, Enum, and arrays of primitive types.

Return Value

TReturn
The field value cast to TReturn.
Exceptions
ExceptionCondition
InvalidOperationException Thrown if no field named fieldName is found on the underlying Java class.
InvalidCastException Thrown if the actual field value cannot be cast to TReturn.
See Also