Field is a slot which models the ability to get and set a value.
Slots
- getSource
-
virtual Obj? get(Obj? instance := null)
Get the field for the specified instance. If the field is static, then the instance parameter is ignored. If the getter is non-null, then it is used to get the field.
- makeSource
-
new make(Str name, Type of, [Str:Obj]? facets := null)
Dynamic slot constructor. Dynamic fields must subclass
Field
and overrideget
andset
with an implementation for managing the state of the field. - ofSource
-
Type of()
Type stored by the field.
- setSource
-
virtual Void set(Obj? instance, Obj? value)
Set the field for the specified instance. If the field is static, then the instance parameter is ignored. If the setter is non-null, then it is used to set the field.