text: /**
   * Generated by Apache Royale Compiler from QName.as
   * QName
   *
   * @fileoverview
   *
   * @suppress {missingRequire|checkTypes|accessControls}
   */
  
  goog.provide('QName');
  /* Royale Dependency List: Namespace,org.apache.royale.utils.Language*/
  
  
  
  
  /**
   * @constructor
   * @param {*=} qNameOrUri
   * @param {*=} localNameVal
   */
  QName = function(qNameOrUri, localNameVal) {
    qNameOrUri = typeof qNameOrUri !== 'undefined' ? qNameOrUri : null;
    localNameVal = typeof localNameVal !== 'undefined' ? localNameVal : null;
    if (org.apache.royale.utils.Language.is(qNameOrUri, QName)) {
      this._uri = org.apache.royale.utils.Language.string(qNameOrUri.uri);
      this._localName = org.apache.royale.utils.Language.string(qNameOrUri.localName);
      this._prefix = org.apache.royale.utils.Language.string(qNameOrUri.prefix);
    } else if (org.apache.royale.utils.Language.is(qNameOrUri, Namespace)) {
      this._uri = org.apache.royale.utils.Language.as(qNameOrUri, Namespace).uri;
      this._prefix = org.apache.royale.utils.Language.as(qNameOrUri, Namespace).prefix;
      if (localNameVal)
        this._localName = localNameVal.toString();
    } else if (localNameVal) {
      this._localName = org.apache.royale.utils.Language.string(localNameVal);
      this._uri = org.apache.royale.utils.Language.string(qNameOrUri);
    } else if (qNameOrUri && qNameOrUri.toString()) {
      this._localName = qNameOrUri.toString();
    }
  };
  
  
  /**
   * Prevent renaming of class. Needed for reflection.
   */
  goog.exportSymbol('QName', QName);
  
  
  /**
   * @private
   * @type {string}
   */
  QName.prototype._uri;
  
  
  /**
   * @private
   * @type {string}
   */
  QName.prototype._localName;
  
  
  /**
   * @private
   * @type {string}
   */
  QName.prototype._prefix;
  
  
  /**
   * @export
   * @return {string}
   */
  QName.prototype.toString = function() {
    var /** @type {string} */ uriVal = this._uri ? this._uri : "*";
    return uriVal + "::" + this._localName;
  };
  
  
  /**
   * @export
   * @param {QName} name
   * @return {boolean}
   */
  QName.prototype.equals = function(name) {
    return this.uri == name.uri && this.localName == name.localName;
  };
  
  
  /**
   * @export
   * @param {QName} name
   * @return {boolean}
   */
  QName.prototype.matches = function(name) {
    if (this.uri == "*" || name.uri == "*")
      return this.localName == "*" || name.localName == "*" || this.localName == name.localName;
    if (this.localName == "*" || name.localName == "*")
      return this.uri == name.uri;
    return this.uri == name.uri && this.localName == name.localName;
  };
  
  
  /**
   * @private
   * @type {boolean}
   */
  QName.prototype._isAttribute;
  
  
  /**
   * @export
   * @param {Array=} namespaces
   * @return {Namespace}
   */
  QName.prototype.getNamespace = function(namespaces) {
    namespaces = typeof namespaces !== 'undefined' ? namespaces : null;
    var /** @type {number} */ i = 0;
    var /** @type {Namespace} */ possibleMatch;
    if (!namespaces)
      namespaces = [];
    for (i = 0; i < namespaces.length; i++) {
      if (namespaces[i].uri == this._uri) {
        possibleMatch = namespaces[i];
        if (namespaces[i].prefix == this._prefix)
          return namespaces[i];
      }
    }
    if (possibleMatch)
      return possibleMatch;
    if (!this._prefix)
      return new Namespace(this._uri);
    return new Namespace(this._prefix, this._uri);
  };
  
  
  QName.prototype.get__uri = function() {
    return this._uri;
  };
  
  
  QName.prototype.set__uri = function(value) {
    this._uri = value;
  };
  
  
  QName.prototype.get__localName = function() {
    return this._localName;
  };
  
  
  QName.prototype.set__localName = function(value) {
    this._localName = value;
  };
  
  
  QName.prototype.get__prefix = function() {
    return this._prefix;
  };
  
  
  QName.prototype.set__prefix = function(value) {
    this._prefix = value;
  };
  
  
  QName.prototype.get__isAttribute = function() {
    return this._isAttribute;
  };
  
  
  QName.prototype.set__isAttribute = function(value) {
    this._isAttribute = value;
  };
  
  
  Object.defineProperties(QName.prototype, /** @lends {QName.prototype} */ {
  /**
    * @export
    * @type {string} */
  uri: {
  get: QName.prototype.get__uri,
  set: QName.prototype.set__uri},
  /**
    * @export
    * @type {string} */
  localName: {
  get: QName.prototype.get__localName,
  set: QName.prototype.set__localName},
  /**
    * @export
    * @type {string} */
  prefix: {
  get: QName.prototype.get__prefix,
  set: QName.prototype.set__prefix},
  /**
    * @export
    * @type {boolean} */
  isAttribute: {
  get: QName.prototype.get__isAttribute,
  set: QName.prototype.set__isAttribute}}
  );
  
  
  /**
   * Metadata
   *
   * @type {Object.<string, Array.<Object>>}
   */
  QName.prototype.ROYALE_CLASS_INFO = { names: [{ name: 'QName', qName: 'QName', kind: 'class' }] };
  
  
  
  /**
   * Reflection
   *
   * @return {Object.<string, Function>}
   */
  QName.prototype.ROYALE_REFLECTION_INFO = function () {
    return {
      variables: function () {return {};},
      accessors: function () {
        return {
          'uri': { type: 'String', access: 'readwrite', declaredBy: 'QName'},
          'localName': { type: 'String', access: 'readwrite', declaredBy: 'QName'},
          'prefix': { type: 'String', access: 'readwrite', declaredBy: 'QName'},
          'isAttribute': { type: 'Boolean', access: 'readwrite', declaredBy: 'QName'}
        };
      },
      methods: function () {
        return {
          'QName': { type: '', declaredBy: 'QName', parameters: function () { return [  { index: 1, type: '*', optional: true },{ index: 2, type: '*', optional: true } ]; }},
          'toString': { type: 'String', declaredBy: 'QName'},
          'equals': { type: 'Boolean', declaredBy: 'QName', parameters: function () { return [  { index: 1, type: 'QName', optional: false } ]; }},
          'matches': { type: 'Boolean', declaredBy: 'QName', parameters: function () { return [  { index: 1, type: 'QName', optional: false } ]; }},
          'getNamespace': { type: 'Namespace', declaredBy: 'QName', parameters: function () { return [  { index: 1, type: 'Array', optional: true } ]; }}
        };
      }
    };
  };
  