Click or drag to resize

JCOBridgeConvertTReturn(Object, Boolean) Method

Converts a generic object

Namespace: MASES.JCOBridge.C2JBridge
Assembly: C2JBridge (in C2JBridge.dll) Version: 2.6.10.261112-5ffe0920c00dbac056780af7ab9b1978b26ef4a5
Syntax
public static TReturn Convert<TReturn>(
	Object obj,
	bool dispose = false
)

Parameters

obj  Object
The value to be converted
dispose  Boolean  (Optional)
Set to to invoke Dispose on the obj to reduce GC pressure, default is and Garbage Collector will manage removal of JVM references

Type Parameters

TReturn
The return type expected: a class inherited from IJVMBridgeBase, IJavaObject, Enum, primitive types or array of primitives types

Return Value

TReturn
The return value converted to TReturn, or
Remarks
dispose applies on conversion that does not need anymore the obj: e.g. conversion to String, primitive types, arrays. Other conversion that needs that obj does not removes JVM reference are not managed from dispose
See Also