Class AccessorSlot
java.lang.Object
org.mozilla.javascript.Slot
org.mozilla.javascript.AccessorSlot
- All Implemented Interfaces:
Serializable
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final classThis is a getter that delegates to a JavaScript function.(package private) static final classInvoke the setter as a JavaScript function, taking care that it might actually be Undefined.(package private) static interface(package private) static final classThis is a Getter that delegates to a Java function via a MemberBox.(package private) static final classInvoke the setter on this slot via reflection using MemberBox.(package private) static interface -
Field Summary
FieldsModifier and TypeFieldDescription(package private) AccessorSlot.Getterprivate static final long(package private) AccessorSlot.SetterFields inherited from class Slot
indexOrHash, name, next, orderedNext, value -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) FunctiongetGetterFunction(String name, Scriptable scope) Same for the "getter."(package private) ScriptableObjectgetPropertyDescriptor(Context cx, Scriptable scope) (package private) FunctiongetSetterFunction(String name, Scriptable scope) Return a JavaScript function that represents the "setter".getValue(Scriptable start) (package private) booleanReturn true if this is a "setter slot" which, which we need to know for some legacy support.(package private) booleanReturn true if this is a base-class "Slot".booleansetValue(Object value, Scriptable owner, Scriptable start) Methods inherited from class Slot
getAttributes, setAttributes, throwNoSetterException
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
getter
-
setter
-
-
Constructor Details
-
AccessorSlot
AccessorSlot(Slot oldSlot)
-
-
Method Details
-
isValueSlot
boolean isValueSlot()Description copied from class:SlotReturn true if this is a base-class "Slot". Sadly too much code breaks if we try to do this any other way.- Overrides:
isValueSlotin classSlot
-
isSetterSlot
boolean isSetterSlot()Description copied from class:SlotReturn true if this is a "setter slot" which, which we need to know for some legacy support.- Overrides:
isSetterSlotin classSlot
-
getPropertyDescriptor
- Overrides:
getPropertyDescriptorin classSlot
-
setValue
-
getValue
-
getSetterFunction
Description copied from class:SlotReturn a JavaScript function that represents the "setter". This is used by some legacy functionality. Return null if there is no setter.- Overrides:
getSetterFunctionin classSlot
-
getGetterFunction
Description copied from class:SlotSame for the "getter."- Overrides:
getGetterFunctionin classSlot
-