src/sap.ui.core/src/sap/ui/base/Metadata.js
function(sClassName, oClassInfo) {

		assert(typeof sClassName === "string" && sClassName, "Metadata: sClassName must be a non-empty string");
		assert(typeof oClassInfo === "object", "Metadata: oClassInfo must be empty or an object");

		// support for old usage of Metadata
		if ( !oClassInfo || typeof oClassInfo.metadata !== "object" ) {
			oClassInfo = {
				metadata : oClassInfo || {},
				// retrieve class by its name. Using a lookup costs time but avoids the need for redundant arguments to this function
				constructor : ObjectPath.get(sClassName)
			};
			oClassInfo.metadata.__version = 1.0;
		}
		oClassInfo.metadata.__version = oClassInfo.metadata.__version || 2.0;
		if ( typeof oClassInfo.constructor !== "function" ) {
			throw Error("constructor for class " + sClassName + " must have been declared before creating metadata for it");
		}

		// invariant: oClassInfo exists, oClassInfo.metadata exists, oClassInfo.constructor exists
		this._sClassName = sClassName;
		this._oClass = oClassInfo.constructor;
		this.extend(oClassInfo);
	}
function(sClassName, oClassInfo) {

		assert(typeof sClassName === "string" && sClassName, "Metadata: sClassName must be a non-empty string");
		assert(typeof oClassInfo === "object", "Metadata: oClassInfo must be empty or an object");

		// support for old usage of Metadata
		if ( !oClassInfo || typeof oClassInfo.metadata !== "object" ) {
			oClassInfo = {
				metadata : oClassInfo || {},
				// retrieve class by its name. Using a lookup costs time but avoids the need for redundant arguments to this function
				constructor : ObjectPath.get(sClassName)
			};
			oClassInfo.metadata.__version = 1.0;
		}
		oClassInfo.metadata.__version = oClassInfo.metadata.__version || 2.0;
		if ( typeof oClassInfo.constructor !== "function" ) {
			throw Error("constructor for class " + sClassName + " must have been declared before creating metadata for it");
		}

		// invariant: oClassInfo exists, oClassInfo.metadata exists, oClassInfo.constructor exists
		this._sClassName = sClassName;
		this._oClass = oClassInfo.constructor;
		this.extend(oClassInfo);
	}
function ( sClassName , oClassInfo ) { assert ( typeof sClassName === "string" && sClassName , "Metadata: sClassName must be a non-empty string" ) ; assert ( typeof oClassInfo === "object" , "Metadata: oClassInfo must be empty or an object" ) ; // support for old usage of Metadata if ( ! oClassInfo || typeof oClassInfo . metadata !== "object" ) { oClassInfo = { metadata : oClassInfo || { } , // retrieve class by its name. Using a lookup costs time but avoids the need for redundant arguments to this function constructor : ObjectPath . get ( sClassName ) } ; oClassInfo . metadata . __version = 1.0 ; } oClassInfo . metadata . __version = oClassInfo . metadata . __version || 2.0 ; if ( typeof oClassInfo . constructor !== "function" ) { throw Error ( "constructor for class " + sClassName + " must have been declared before creating metadata for it" ) ; } // invariant: oClassInfo exists, oClassInfo.metadata exists, oClassInfo.constructor exists this . _sClassName = sClassName ; this . _oClass = oClassInfo . constructor ; this . extend ( oClassInfo ) ; }
Creates a new metadata object from the given static infos.

Note: throughout this class documentation, the described subclass of Object
is referenced as <i>the described class</i>.

@param {string} sClassName fully qualified name of the described class
@param {object} oClassInfo info to construct the class and its metadata from

@class Metadata for a class.
@author Frank Weigel
@version ${version}
@since 0.8.6
@public
@alias sap.ui.base.Metadata
Creates a new metadata object from the given static infos .