class documentation

class _SpecificTypeRegistration(Generic[_JSONableType]): (source)

View In Hierarchy

General container for registering a specific kind of type (instances, plain callables, repeated callables).

Method add Add the given type to the registry, keyed by its typeCodeForJSON.
Method copy Copy the given _SpecificTypeRegistration to derive another from it.
Method get Get a type from the registry by the result of its typeCodeForJSON classmethod, previously registered by _SpecificTypeRegistration.add.
Instance Variable registered The specific type registration.

Add the given type to the registry, keyed by its typeCodeForJSON.

Copy the given _SpecificTypeRegistration to derive another from it.

def get(self, typeCode: str) -> _JSONableType | None: (source)

Get a type from the registry by the result of its typeCodeForJSON classmethod, previously registered by _SpecificTypeRegistration.add.

The specific type registration.