Language

JavaPeerableExtensions Class

Definition

Extension methods on IJavaPeerable.

public static class JavaPeerableExtensions
type JavaPeerableExtensions = class
Inheritance
JavaPeerableExtensions

Remarks

JavaAs and TryJavaCast return null or false for a null peer or an invalid peer reference. A successful conversion can return the original managed object or create a wrapper for the same Java reference.

Methods

Name Description
GetJniTypeName(IJavaPeerable)

Gets the JNI name of the type of the instance self.

JavaAs<TResult>(IJavaPeerable)

Try to coerce self to type TResult, checking that the coercion is valid on the Java side.

TryJavaCast<TResult>(IJavaPeerable, TResult)

Try to coerce self to type TResult, checking that the coercion is valid on the Java side.

Applies to