 | JCOBridgeConvertTReturn(Object, Boolean) Method |
Converts a generic object
Namespace: MASES.JCOBridge.C2JBridgeAssembly: C2JBridge (in C2JBridge.dll) Version: 2.6.10.261112-5ffe0920c00dbac056780af7ab9b1978b26ef4a5
Syntaxpublic static TReturn Convert<TReturn>(
Object obj,
bool dispose = false
)
Public Shared Function Convert(Of TReturn) (
obj As Object,
Optional dispose As Boolean = false
) As TReturn
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
TReturnThe return value converted to
TReturn, or
Remarksdispose 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