VettingsCache

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.

Author

Mark van Gulik

Constructors

Link copied to clipboard
fun VettingsCache()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun testObjectAgainstType(theObject: AvailObject, objectType: AvailObject): Boolean

Test if theObject, which is instantiation of ObjectDescriptor, is an instance of objectType, which is a Mutability.SHARED instantiation of ObjectTypeDescriptor. The receiver is theObject's vettings cache, and may be updated by this test.

Properties

Link copied to clipboard
var negativeCache1: Array<WeakObjectTypeReference>

One of the two negative caches. If the object that holds this VettingsCache has a particular object type in this slot (inside a WeakObjectTypeReference), the object is known not to be an instance of that object type.

Link copied to clipboard
var negativeCache2: Array<WeakObjectTypeReference>

One of the two negative caches. If the object that holds this VettingsCache has a particular object type in this slot (inside a WeakObjectTypeReference), the object is known not to be an instance of that object type.

Link copied to clipboard
var positiveCache1: Array<WeakObjectTypeReference>

One of the two positive caches. If the object that holds this VettingsCache has a particular object type in this slot (inside a WeakObjectTypeReference), the object is known to be an instance of that object type.

Link copied to clipboard
var positiveCache2: Array<WeakObjectTypeReference>

One of the two positive caches. If the object that holds this VettingsCache has a particular object type in this slot (inside a WeakObjectTypeReference), the object is known to be an instance of that object type.