Class WeakValue.Builder<B extends WeakValue.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Enclosing class:
WeakValue

public static class WeakValue.Builder<B extends WeakValue.Builder<B>> extends GObject.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public WeakValue build()
      Finish building the WeakValue object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to WeakValue.
      Overrides:
      build in class GObject.Builder<B extends WeakValue.Builder<B>>
      Returns:
      a new instance of WeakValue with the properties that were set in the Builder object.
    • setValue

      public B setValue(Value value)
      The JSCValue referencing the JavaScript value.
      Parameters:
      value - the value for the value property
      Returns:
      the Builder instance is returned, to allow method chaining
    • onCleared

      public B onCleared(WeakValue.ClearedCallback handler)
      This signal is emitted when the JavaScript value is destroyed.
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also: