Class Context.Builder<B extends Context.Builder<B>>

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

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

      public B setVirtualMachine(VirtualMachine virtualMachine)
      The JSCVirtualMachine in which the context was created.
      Parameters:
      virtualMachine - the value for the virtual-machine property
      Returns:
      the Builder instance is returned, to allow method chaining