compile method Null safety

  1. @override
Map<String, dynamic> compile(
  1. MirrorContext context
)

Returns a map of runtime objects that can be used at runtime while running in mirrored mode.

Implementation

@override
Map<String, dynamic> compile(MirrorContext context) {
  final m = <String, dynamic>{};

  m.addEntries(
    context
        .getSubclassesOf(ApplicationChannel)
        .map((t) => MapEntry(_getClassName(t), ChannelRuntimeImpl(t))),
  );
  m.addEntries(
    context
        .getSubclassesOf(Serializable)
        .map((t) => MapEntry(_getClassName(t), SerializableRuntimeImpl(t))),
  );
  m.addEntries(
    context
        .getSubclassesOf(Controller)
        .map((t) => MapEntry(_getClassName(t), ControllerRuntimeImpl(t))),
  );

  m.addAll(DataModelCompiler().compile(context));

  return m;
}