Class ClassVTable

java.lang.Object
org.javagi.base.ProxyInstance
org.webkitgtk.jsc.ClassVTable
All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class ClassVTable extends ProxyInstance
Virtual table for a JSCClass. This can be optionally used when registering a JSCClass in a JSCContext to provide a custom implementation for the class. All virtual functions are optional and can be set to null to fallback to the default implementation.
  • Constructor Details

    • ClassVTable

      public ClassVTable(MemorySegment address)
      Create a ClassVTable proxy instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • ClassVTable

      public ClassVTable(Arena arena)
      Allocate a new ClassVTable.
      Parameters:
      arena - to control the memory allocation scope
    • ClassVTable

      public ClassVTable()
      Allocate a new ClassVTable. The memory is allocated with Arena.ofAuto().
    • ClassVTable

      public ClassVTable(ClassGetPropertyFunction getProperty, ClassSetPropertyFunction setProperty, ClassHasPropertyFunction hasProperty, ClassDeletePropertyFunction deleteProperty, ClassEnumeratePropertiesFunction enumerateProperties, Arena arena)
      Allocate a new ClassVTable with the fields set to the provided values.
      Parameters:
      getProperty - value for the field getProperty
      setProperty - value for the field setProperty
      hasProperty - value for the field hasProperty
      deleteProperty - value for the field deleteProperty
      enumerateProperties - value for the field enumerateProperties
      arena - to control the memory allocation scope
    • ClassVTable

      public ClassVTable(ClassGetPropertyFunction getProperty, ClassSetPropertyFunction setProperty, ClassHasPropertyFunction hasProperty, ClassDeletePropertyFunction deleteProperty, ClassEnumeratePropertiesFunction enumerateProperties)
      Allocate a new ClassVTable with the fields set to the provided values. The memory is allocated with Arena.ofAuto().
      Parameters:
      getProperty - value for the field getProperty
      setProperty - value for the field setProperty
      hasProperty - value for the field hasProperty
      deleteProperty - value for the field deleteProperty
      enumerateProperties - value for the field enumerateProperties
  • Method Details

    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • readGetProperty

      public @Nullable ClassGetPropertyFunction readGetProperty()
      Read the value of the field get_property.
      Returns:
      The value of the field get_property
    • writeGetProperty

      public void writeGetProperty(@Nullable ClassGetPropertyFunction getProperty, Arena _arena)
      Write a value in the field get_property.
      Parameters:
      getProperty - The new value for the field get_property
      _arena - to control the memory allocation scope
    • readSetProperty

      public @Nullable ClassSetPropertyFunction readSetProperty()
      Read the value of the field set_property.
      Returns:
      The value of the field set_property
    • writeSetProperty

      public void writeSetProperty(@Nullable ClassSetPropertyFunction setProperty, Arena _arena)
      Write a value in the field set_property.
      Parameters:
      setProperty - The new value for the field set_property
      _arena - to control the memory allocation scope
    • readHasProperty

      public @Nullable ClassHasPropertyFunction readHasProperty()
      Read the value of the field has_property.
      Returns:
      The value of the field has_property
    • writeHasProperty

      public void writeHasProperty(@Nullable ClassHasPropertyFunction hasProperty, Arena _arena)
      Write a value in the field has_property.
      Parameters:
      hasProperty - The new value for the field has_property
      _arena - to control the memory allocation scope
    • readDeleteProperty

      public @Nullable ClassDeletePropertyFunction readDeleteProperty()
      Read the value of the field delete_property.
      Returns:
      The value of the field delete_property
    • writeDeleteProperty

      public void writeDeleteProperty(@Nullable ClassDeletePropertyFunction deleteProperty, Arena _arena)
      Write a value in the field delete_property.
      Parameters:
      deleteProperty - The new value for the field delete_property
      _arena - to control the memory allocation scope
    • readEnumerateProperties

      public @Nullable ClassEnumeratePropertiesFunction readEnumerateProperties()
      Read the value of the field enumerate_properties.
      Returns:
      The value of the field enumerate_properties
    • writeEnumerateProperties

      public void writeEnumerateProperties(@Nullable ClassEnumeratePropertiesFunction enumerateProperties, Arena _arena)
      Write a value in the field enumerate_properties.
      Parameters:
      enumerateProperties - The new value for the field enumerate_properties
      _arena - to control the memory allocation scope