TestComponents class final

The component codecs a world would know, written down, with nothing saved.

It refuses a codec id another type has (NameTakenException) and, through a plugin's view, one outside the plugin's namespace (PluginException), as the engine's world does.

Inheritance

Constructors

TestComponents()
An empty registry.

Properties

companions → Iterable<PluginRegistry>
The registries that come with this one, found by PluginHost.registry as if each had been handed to the host itself.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
registered → List<ComponentInfo>
Every registered and excluded type, in registration order.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

add<T extends Object>(ComponentCodec<T> codec, {bool published = false}) → Registration
Says how components of type T are written down. Throws a NameTakenException when codec's id is taken by another type.
override
codecNamed(String id) → ComponentCodec<Object>?
The codec registered under id; null when there is none (absent).
override
codecOf<T extends Object>() → ComponentCodec<T>?
The codec registered for T; null when there is none (absent).
override
exclude<T extends Object>(String because) → Registration
Says that components of type T are deliberately not saved, and why: a renderer handle, a cache, anything rebuilt from what is saved.
override
forPlugin(PluginScope scope) → ComponentRegistry
This registry as scope's plugin sees it: everything registered through the result is tracked by scope, ranked by it, and checked against its manifest. Must return the same type the registry is looked up by.
override
isPublished<T extends Object>() → bool
Whether T is registered with published: true.
override
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