docs: function (typeName, packageDef) {
                  var packageName, otherBP;
                  var i = typeName.indexOf(':');
                  // if no semicolumn, type is defined inside this package
                  if (i == -1) {
                      packageName = packageDef.$package;
                      otherBP = packageDef;
                  } else {
                      var ns = typeName.substr(0, i);
                      typeName = typeName.substr(i + 1);
                      packageName = (packageDef.$namespaces == null ? null : packageDef.$namespaces[ns]);
                      if (typeUtils.isObject(packageName)) {
                          packageName = packageName.$package;
                      }
                      if (!packageName) {
                          this._logError(this.UNDEFINED_PREFIX, [ns, this._currentBeanName]);
                          return this._typeRefError;
                      }
                  }
  
                  var fullName = packageName + "." + typeName;
                  var typeRef = this.__processedBeans[fullName];
                  if (typeRef) {
                      return typeRef;
                  }
  
                  if (!otherBP) {
                      otherBP = this.__loadedBeans[packageName];
                      if (!otherBP) {
                          this._logError(this.MISSING_BEANSPACKAGE, [packageName, this._currentBeanName]);
                          return this._typeRefError;
                      }
                  }
  
                  typeRef = this.__findTypeInBP(otherBP, typeName);
  
                  // update this type name with fully qualified name
                  if (typeRef != this._typeError && !typeRef[this._MD_TYPENAME]) {
                      typeRef[this._MD_TYPENAME] = fullName;
                  }
  
                  return typeRef;
              }