ModelDBImpl constructor

ModelDBImpl()

Initializes a new ModelDB from all libraries.

This will scan all libraries for classes with a Kind annotation.

In case an error is encountered (e.g. two model classes with the same kind name) a StateError will be thrown.

Implementation

ModelDBImpl() {
  // WARNING: This is O(n) of the source code, which is very bad!
  // Would be nice to have: `currentMirrorSystem().subclassesOf(Model)`
  _initialize(mirrors.currentMirrorSystem().libraries.values);
}