Package org.htmlunit.corejs.javascript
Class Slot
- java.lang.Object
-
- org.htmlunit.corejs.javascript.Slot
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
AccessorSlot
,LambdaSlot
,LazyLoadSlot
public class Slot extends java.lang.Object implements java.io.Serializable
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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private short
attributes
(package private) int
indexOrHash
(package private) java.lang.Object
name
(package private) Slot
next
(package private) Slot
orderedNext
private static long
serialVersionUID
(package private) java.lang.Object
value
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) int
getAttributes()
(package private) Function
getGetterFunction(java.lang.String name, Scriptable scope)
Same for the "getter."(package private) ScriptableObject
getPropertyDescriptor(Context cx, Scriptable scope)
(package private) Function
getSetterFunction(java.lang.String name, Scriptable scope)
Return a JavaScript function that represents the "setter".java.lang.Object
getValue(Scriptable start)
(package private) boolean
isSetterSlot()
Return true if this is a "setter slot" which, which we need to know for some legacy support.(package private) boolean
isValueSlot()
Return true if this is a base-class "Slot".private void
readObject(java.io.ObjectInputStream in)
(package private) void
setAttributes(int value)
boolean
setValue(java.lang.Object value, Scriptable owner, Scriptable start)
boolean
setValue(java.lang.Object value, Scriptable owner, Scriptable start, boolean isThrow)
protected void
throwNoSetterException(Scriptable start, java.lang.Object newValue)
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
name
java.lang.Object name
-
indexOrHash
int indexOrHash
-
attributes
private short attributes
-
value
java.lang.Object value
-
next
transient Slot next
-
orderedNext
transient Slot orderedNext
-
-
Constructor Detail
-
Slot
Slot(java.lang.Object name, int indexOrHash, int attributes)
-
Slot
protected Slot(Slot oldSlot)
-
-
Method Detail
-
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
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
setValue
public final boolean setValue(java.lang.Object value, Scriptable owner, Scriptable start)
-
setValue
public boolean setValue(java.lang.Object value, Scriptable owner, Scriptable start, boolean isThrow)
-
getValue
public java.lang.Object getValue(Scriptable start)
-
getAttributes
int getAttributes()
-
setAttributes
void setAttributes(int value)
-
getPropertyDescriptor
ScriptableObject getPropertyDescriptor(Context cx, Scriptable scope)
-
throwNoSetterException
protected void throwNoSetterException(Scriptable start, java.lang.Object newValue)
-
getSetterFunction
Function getSetterFunction(java.lang.String name, Scriptable scope)
Return a JavaScript function that represents the "setter". This is used by some legacy functionality. Return null if there is no setter.
-
getGetterFunction
Function getGetterFunction(java.lang.String name, Scriptable scope)
Same for the "getter."
-
-