registerSubclass<T extends LCObject> method Null safety

void registerSubclass<T extends LCObject>(
  1. String className,
  2. Function constructor
)

Registers a subclass named className with constructor.

Implementation

static void registerSubclass<T extends LCObject>(
    String className, Function constructor) {
  _LCSubclassInfo subclassInfo =
      new _LCSubclassInfo(className, T, constructor);
  _subclassTypeMap[T] = subclassInfo;
  _subclassNameMap[className] = subclassInfo;
}