ModelDBImpl.fromLibrary constructor

ModelDBImpl.fromLibrary(
  1. Symbol librarySymbol
)

Initializes a new ModelDB from all libraries.

This will scan the given librarySymbol 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.fromLibrary(Symbol librarySymbol) {
  _initialize([mirrors.currentMirrorSystem().findLibrary(librarySymbol)]);
}