public class BuiltInSlot<T extends ScriptableObject> extends Slot
It will generate a plain data descriptor when a property descriptor is produced from it, as the properties we might want to internalise do not necessarily have get and set functions.
Holding the `owner` on this object and passing it to the various accessor functions was a design choice to reduce object creation under the current slot implementation, and to facilitate the separation of slots and descriptors in future.
The owner must be held specifically as the current slot APIs do not pass in the owner of the map from which a slot was fetched. We store it in the slot's value field as this is not used for any real value storage on a built in slot.
| Modifier and Type | Class and Description |
|---|---|
static interface |
BuiltInSlot.AttributeSetter<U extends ScriptableObject> |
static interface |
BuiltInSlot.Getter<U extends ScriptableObject> |
static interface |
BuiltInSlot.PropDescriptionSetter<U extends ScriptableObject> |
static interface |
BuiltInSlot.Setter<U extends ScriptableObject> |
| Modifier and Type | Method and Description |
|---|---|
Object |
getValue(Scriptable start) |
boolean |
setValue(Object value,
Scriptable owner,
Scriptable start,
boolean isThrow) |
void |
setValueFromDescriptor(Object value,
Scriptable owner,
Scriptable start,
boolean isThrow) |
setValue, throwNoSetterExceptionpublic Object getValue(Scriptable start)
public boolean setValue(Object value, Scriptable owner, Scriptable start, boolean isThrow)
public void setValueFromDescriptor(Object value, Scriptable owner, Scriptable start, boolean isThrow)
Copyright © 2025 HtmlUnit. All rights reserved.