bindExternalClass method

void bindExternalClass(
  1. HTExternalClass externalClass, {
  2. bool override = false,
})

Register a external class into scrfipt. For acessing static members and constructors of this class, there must also be a declaraction in script

Implementation

void bindExternalClass(HTExternalClass externalClass,
    {bool override = false}) {
  if (externClasses.containsKey(externalClass.id) && !override) {
    throw HTError.defined(externalClass.id, ErrorType.runtimeError);
  }
  externClasses[externalClass.id] = externalClass;
}