Package avail.descriptor.objects

Types

Link copied to clipboard
class ObjectDescriptor : Descriptor

Avail user-defined object types are novel. They consist of a map of keys (field name atoms) and their associated field types. Similarly, user-defined objects consist of a map from field names to field values. An object instance conforms to an object type if and only if the instance's field keys are a superset of the type's field keys, and for each field key in common, the field value is an instance of the field type.

Link copied to clipboard
class ObjectLayoutVariant

The ObjectLayoutVariants capture field layouts for objects and object types. An object or object type's descriptor refers to a variant, and the variant contains a mapping from each present field atom to the slot number within the object or object type. All objects or object types with a particular set of field atoms have the same variant.

Link copied to clipboard
class ObjectTypeDescriptor : TypeDescriptor

ObjectTypeDescriptor represents an Avail object type. An object type associates fields with types. An object type's instances have at least the same fields and field values that are instances of the corresponding types.

Link copied to clipboard
class VettingsCache

A VettingsCache is stored as a pojo in an object to cache tests of membership against object types. It consists of two 'positive' arrays of WeakObjectTypeReferences that the owning object was found to be an instance of, and two 'negative' arrays of WeakObjectTypeReferences that the owning object was found not to be an instance of.

Link copied to clipboard
class WeakObjectTypeReference(objectType: AvailObject) : WeakReference<AvailObject>

A WeakObjectTypeReference is a specialization of WeakReference that weakly holds an AvailObject which is always an object type whose descriptor indicates it's Mutability.SHARED. It also holds that object type's hash value.