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 class
This is a getter that delegates to a JavaScript function.(package private) static final class
Invoke the setter as a JavaScript function, taking care that it might actually be Undefined.(package private) static interface
(package private) static final class
This is a Getter that delegates to a Java function via a MemberBox.(package private) static final class
Invoke the setter on this slot via reflection using MemberBox.(package private) static interface
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) AccessorSlot.Getter
private static final long
(package private) AccessorSlot.Setter
Fields inherited from class Slot
indexOrHash, name, next, orderedNext, value
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) Function
getGetterFunction
(String name, Scriptable scope) Same for the "getter."(package private) ScriptableObject
getPropertyDescriptor
(Context cx, Scriptable scope) (package private) Function
getSetterFunction
(String name, Scriptable scope) Return a JavaScript function that represents the "setter".getValue
(Scriptable start) (package private) boolean
Return true if this is a "setter slot" which, which we need to know for some legacy support.(package private) boolean
Return true if this is a base-class "Slot".boolean
setValue
(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: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 classSlot
-
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 classSlot
-
getPropertyDescriptor
- Overrides:
getPropertyDescriptor
in classSlot
-
setValue
-
getValue
-
getSetterFunction
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 classSlot
-
getGetterFunction
Description copied from class:Slot
Same for the "getter."- Overrides:
getGetterFunction
in classSlot
-