Table of Contents

Class Supplier<TReturn>

Namespace
Java.Util.Function
Assembly
MASES.JNet.dll
public class Supplier<TReturn> : Supplier, IDynamicMetaObjectProvider, IJVMBridgeCore, IEquatable<IJVMBridgeBaseInstance>, IDisposable, IJVMBridgeBaseStatic, ISupplier<TReturn>, IJVMBridgeBase, IJVMBridgeBaseInstance, IJVMBridgeDefinition

Type Parameters

TReturn

The return data type associated to the event

Inheritance
Supplier<TReturn>
Implements
ISupplier<TReturn>
Derived
Inherited Members
Extension Methods

Constructors

Supplier()

Initialize a new instance of Supplier<TReturn>

public Supplier()

Properties

OnGet

The Func<TResult> to be executed

public virtual Func<TReturn> OnGet { get; set; }

Property Value

Func<TReturn>

OnGetDispose

Optional handler invoked after the event handler returns, to dispose the JVM object returned by this event.

public Action<TReturn> OnGetDispose { get; set; }

Property Value

Action<TReturn>

Remarks

Set OnGetDispose when the event handler returns a JVM-backed object that is no longer needed after the call. The handler receives the return value and is responsible for calling Dispose() on it, releasing the underlying JVM global reference immediately instead of waiting for the .NET garbage collector to finalize it. If not set, the return value is not disposed automatically.

Methods

Get()

Executes the Supplier action in the CLR

public virtual TReturn Get()

Returns

TReturn

The get TReturn