Package org.htmlunit.corejs.javascript
Class Slot
java.lang.Object
org.htmlunit.corejs.javascript.Slot
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AccessorSlot
,LambdaSlot
,LazyLoadSlot
A Slot is the base class for all properties stored in the ScriptableObject class. There are a
number of different types of slots. This base class represents an "ordinary" property such as a
primitive type or another object. Separate classes are used to represent properties that have
various types of getter and setter methods.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) int
(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".private void
(package private) void
setAttributes
(int value) final boolean
setValue
(Object value, Scriptable owner, Scriptable start) boolean
setValue
(Object value, Scriptable owner, Scriptable start, boolean isThrow) protected void
throwNoSetterException
(Scriptable start, Object newValue)
-
Field Details
-
Constructor Details
-
Slot
Slot(Object name, int indexOrHash, int attributes) -
Slot
-
-
Method Details
-
isValueSlot
boolean isValueSlot()Return true if this is a base-class "Slot". Sadly too much code breaks if we try to do this any other way. -
isSetterSlot
boolean isSetterSlot()Return true if this is a "setter slot" which, which we need to know for some legacy support. -
readObject
- Throws:
IOException
ClassNotFoundException
-
setValue
-
setValue
-
getValue
-
getAttributes
int getAttributes() -
setAttributes
void setAttributes(int value) -
getPropertyDescriptor
-
throwNoSetterException
-
getSetterFunction
Return a JavaScript function that represents the "setter". This is used by some legacy functionality. Return null if there is no setter. -
getGetterFunction
Same for the "getter."
-