Class AccessorSlot

  • All Implemented Interfaces:
    java.io.Serializable

    public class AccessorSlot
    extends Slot
    This is a specialization of Slot to store various types of values that are retrieved dynamically using Java and JavaScript functions. Unlike LambdaSlot, the fact that these values are accessed and mutated by functions is visible via the slot's property descriptor.
    See Also:
    Serialized Form
    • Constructor Detail

      • AccessorSlot

        AccessorSlot​(Slot oldSlot)
    • Method Detail

      • isValueSlot

        boolean isValueSlot()
        Description copied from class: Slot
        Return true if this is a base-class "Slot". Sadly too much code breaks if we try to do this any other way.
        Overrides:
        isValueSlot in class Slot
      • isSetterSlot

        boolean isSetterSlot()
        Description copied from class: Slot
        Return true if this is a "setter slot" which, which we need to know for some legacy support.
        Overrides:
        isSetterSlot in class Slot
      • getSetterFunction

        Function getSetterFunction​(java.lang.String name,
                                   Scriptable scope)
        Description copied from class: Slot
        Return a JavaScript function that represents the "setter". This is used by some legacy functionality. Return null if there is no setter.
        Overrides:
        getSetterFunction in class Slot