docs: function (scriptClass, tplPrototype) {
                  var scriptDef = scriptClass.tplScriptDefinition;
                  if (!scriptDef) {
                      return this.$logError(this.MISSING_TPLSCRIPTDEFINITION, [tplPrototype.$classpath]);
                  }
                  var classpathParts = scriptDef.$classpath.split('.');
                  var className = classpathParts[classpathParts.length - 1];
                  var refScriptProto = '$' + className;
                  var proto = {};
                  if (tplPrototype[refScriptProto]) {
                      return this.$logError(Aria.DUPLICATE_CLASSNAME, [scriptDef.$classpath]);
                  }
                  Aria.copyObject(scriptDef.$prototype, proto);
                  Aria.copyObject(scriptDef.$statics, proto);
  
                  var scriptResources = scriptClass.classDefinition.$resources;
                  if (scriptResources) {
                      var tplPrototypeRes = {};
                      if (tplPrototype.$resources) {
                          Aria.copyObject(tplPrototype.$resources, tplPrototypeRes);
                      }
                      tplPrototype.$resources = tplPrototypeRes;
                      var scriptTransformedProto = scriptClass.prototype;
                      for (var member in scriptResources) {
                          if (scriptResources.hasOwnProperty(member)) {
                              if (tplPrototype[member] && !tplPrototypeRes[member]) {
                                  this.$logError(Aria.RESOURCES_HANDLE_CONFLICT, [member, scriptDef.$classpath]);
                              } else {
                                  proto[member] = scriptTransformedProto[member];
                                  tplPrototypeRes[member] = scriptResources[member];
                              }
                          }
                      }
                  }
  
                  var scriptTexts = scriptClass.classDefinition.$texts;
                  if (scriptTexts) {
                      var tplPrototypeText = {};
                      if (tplPrototype.$texts) {
                          Aria.copyObject(tplPrototype.$texts, tplPrototypeText);
                      }
                      tplPrototype.$texts = tplPrototypeText;
                      for (var member in scriptTexts) {
                          if (scriptTexts.hasOwnProperty(member)) {
                              if (tplPrototype[member] && !tplPrototypeText[member]) {
                                  this.$logError(Aria.TEXT_TEMPLATE_HANDLE_CONFLICT, [member, scriptDef.$classpath]);
                              } else {
                                  proto[member] = scriptClass.prototype[member];
                                  tplPrototypeText[member] = scriptTexts[member];
                              }
                          }
                      }
                  }
  
                  // copy script prototype to template prototype
                  Aria.copyObject(proto, tplPrototype);
                  proto.constructor = scriptDef.$constructor || Aria.empty;
                  proto.$destructor = scriptDef.$destructor || Aria.empty;
                  tplPrototype[refScriptProto] = proto;
              }