/**
 * Generated by Apache Royale Compiler from org\apache\royale\core\View.as
 * org.apache.royale.core.View
 *
 * @fileoverview
 *
 * @suppress {checkTypes|accessControls}
 */

goog.provide('org.apache.royale.core.View');

goog.require('org.apache.royale.core.ValuesManager');
goog.require('org.apache.royale.core.ViewBase');
goog.require('org.apache.royale.events.Event');
goog.require('org.apache.royale.utils.MXMLDataInterpreter');
goog.require('org.apache.royale.core.IMXMLDocument');



/**
 * @constructor
 * @extends {org.apache.royale.core.ViewBase}
 * @implements {org.apache.royale.core.IMXMLDocument}
 */
org.apache.royale.core.View = function() {
  
  this.org_apache_royale_core_View__mxmlDocument = this;
  org.apache.royale.core.View.base(this, 'constructor');
};
goog.inherits(org.apache.royale.core.View, org.apache.royale.core.ViewBase);


/**
 * Prevent renaming of class. Needed for reflection.
 */
goog.exportSymbol('org.apache.royale.core.View', org.apache.royale.core.View);


/**
 * @private
 * @type {Array}
 */
org.apache.royale.core.View.prototype.org_apache_royale_core_View__mxmlDescriptor;


/**
 * @private
 * @type {Object}
 */
org.apache.royale.core.View.prototype.org_apache_royale_core_View__mxmlDocument;


/**
 * @private
 * @type {boolean}
 */
org.apache.royale.core.View.prototype.org_apache_royale_core_View__initialized;


/**
 * @asprivate
 * @export
 * @override
 */
org.apache.royale.core.View.prototype.addedToParent = function() {
  if (!this.org_apache_royale_core_View__initialized) {
    org.apache.royale.core.ValuesManager["valuesImpl"].init(this);
  }
  org.apache.royale.core.View.superClass_.addedToParent.apply(this);
  if (!this.org_apache_royale_core_View__initialized) {
    org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances(this.org_apache_royale_core_View__mxmlDocument, this, this.MXMLDescriptor);
    this.dispatchEvent(new org.apache.royale.events.Event("initBindings"));
    this.dispatchEvent(new org.apache.royale.events.Event("initComplete"));
    this.org_apache_royale_core_View__initialized = true;
  }
};


/**
 *  @asprivate
 * @export
 * @param {Object} document
 * @param {Array} value
 */
org.apache.royale.core.View.prototype.setMXMLDescriptor = function(document, value) {
  this.org_apache_royale_core_View__mxmlDocument = document;
  this.org_apache_royale_core_View__mxmlDescriptor = value;
};


/**
 *  @copy org.apache.royale.core.Application#generateMXMLAttributes()
 *  
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.8
 * @export
 * @param {Array} data
 */
org.apache.royale.core.View.prototype.generateMXMLAttributes = function(data) {
  org.apache.royale.utils.MXMLDataInterpreter.generateMXMLProperties(this, data);
};


/**
 * @export
 * @type {Array}
 */
org.apache.royale.core.View.prototype.mxmlContent;


org.apache.royale.core.View.prototype.get__MXMLDescriptor = function() {
  return this.org_apache_royale_core_View__mxmlDescriptor;
};


Object.defineProperties(org.apache.royale.core.View.prototype, /** @lends {org.apache.royale.core.View.prototype} */ {
/**
  * @export
  * @type {Array} */
MXMLDescriptor: {
get: org.apache.royale.core.View.prototype.get__MXMLDescriptor}}
);


/**
 * Metadata
 *
 * @type {Object.<string, Array.<Object>>}
 */
org.apache.royale.core.View.prototype.ROYALE_CLASS_INFO = { names: [{ name: 'View', qName: 'org.apache.royale.core.View', kind: 'class' }], interfaces: [org.apache.royale.core.IMXMLDocument] };



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.royale.core.View.prototype.ROYALE_REFLECTION_INFO = function () {
  return {
    variables: function () {
      return {
        'mxmlContent': { type: 'Array'}
      };
    },
    accessors: function () {
      return {
        'MXMLDescriptor': { type: 'Array', access: 'readonly', declaredBy: 'org.apache.royale.core.View'}
      };
    },
    methods: function () {
      return {
        'View': { type: '', declaredBy: 'org.apache.royale.core.View'},
        'addedToParent': { type: 'void', declaredBy: 'org.apache.royale.core.View'},
        'setMXMLDescriptor': { type: 'void', declaredBy: 'org.apache.royale.core.View', parameters: function () { return [  { index: 1, type: 'Object', optional: false },{ index: 2, type: 'Array', optional: false } ]; }},
        'generateMXMLAttributes': { type: 'void', declaredBy: 'org.apache.royale.core.View', parameters: function () { return [  { index: 1, type: 'Array', optional: false } ]; }}
      };
    },
    metadata: function () { return [  ]; }
  };
};