InspectionCache class final

Cache for inspection results. This is used to deal with circular references in inspected Python modules.

Constructors

InspectionCache.new()
Creates a new instance of InspectionCache.

Properties

classDefinitions Iterable<ClassDefinition>
Returns all instances of ClassDefinition from the cache. They represent inspected Python class definitions.
no setter
classes Iterable<ClassInstance>
Returns all instances of ClassInstance from the cache. They represent inspected Python class instances. They also contain inspected Python objects related to type annotations. See typedefs for getting only those instances.
no setter
entries Iterable<(int, InspectEntry)>
Returns an iterable of all InspectEntrys in the cache. The iterable contains tuples of the form (id, entry) where id is the id of the entry and entry is the entry itself.
no setter
functions Iterable<Function_>
Returns all instances of Function_ from the cache. They represent inspected Python function objects.
no setter
hashCode int
The hash code for this object.
no setterinherited
modules Iterable<Module>
Returns all instances of Module from the cache. They represent inspected Python module objects.
no setter
objects Iterable<Object_>
Returns all instances of Object_ from the cache. They represent inspected Python objects that are not of any other type.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
typedefs Iterable<ClassInstance>
Returns some instances of ClassInstance from the cache. They represent inspected Python objects related to type annotations. In particular, this returns typing.TypeVar and typing.Union instances.
no setter

Methods

id(Object? key) int?
Returns the id of the InspectEntry for the given key. Returns null if no entry exists for the given key.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](Object? key) InspectEntry?
Retrieves the InspectEntry for the given key. Returns null if no entry exists for the given key.
operator []=(Object? key, InspectEntry value) → void
Sets or updates the InspectEntry for the given key.