function createMetadataProxy(oMetadata, oManifest) {

		// create a proxy for the metadata object and simulate to be an
		// instance of the original metadata object of the Component
		// => retrieving the prototype from the original metadata to
		//    support to proxy sub-classes of ComponentMetadata
		var oMetadataProxy = Object.create(Object.getPrototypeOf(oMetadata));

		// provide internal access to the static metadata object
		oMetadataProxy._oMetadata = oMetadata;
		oMetadataProxy._oManifest = oManifest;

		// copy all functions from the metadata object except of the
		// manifest related functions which will be instance specific now
		// we proxy private core restricted manifest related API, as well as older public/deprecated API (for compatibility)
		for (var m in oMetadata) {
			if (!/^(getManifest|_getManifest|getManifestObject|getManifestEntry|_getManifestEntry|getMetadataVersion)$/.test(m) && typeof oMetadata[m] === "function") {
				oMetadataProxy[m] = oMetadata[m].bind(oMetadata);
			}
		}

		/**
		 * Public on ComponentMetadata, kept for compatibility.
		 *
		 * @deprecated
		 * @return {Object|null} manifest.
		 */
		oMetadataProxy.getManifest = function() {
			return this._getManifest();
		};

		/**
		 * Public on ComponentMetadata, kept for compatibility.
		 * Detailed documentation see ComponentMetadata#getManifestEntry
		 *
		 * @param {string} sKey Either the manifest section name (namespace) or a concrete path
		 * @param {boolean} [bMerged=false] Indicates whether the custom configuration is merged with the parent custom configuration of the Component.
		 * @deprecated
		 * @return {any|null} Value of the manifest section or the key (could be any kind of value)
		 */
		oMetadataProxy.getManifestEntry = function(sKey, bMerged) {
			return this._getManifestEntry(sKey, bMerged);
		};

		oMetadataProxy._getManifest = function() {
			// return the content of the manifest instead of the static metadata
			return oManifest && oManifest.getJson();
		};
		oMetadataProxy.getManifestObject = function() {
			return oManifest;
		};
		oMetadataProxy._getManifestEntry = function(sKey, bMerged) {
			return getManifestEntry(oMetadata, oManifest, sKey, bMerged);
		};
		oMetadataProxy.getMetadataVersion = function() {
			return 2; // instance specific manifest => metadata version 2!
		};

		/*
		 * Provide oMetadataProxy to collectRoutingClasses, to derive routing classes from correct manifest object
		 */
		oMetadataProxy.collectRoutingClasses = oMetadata.collectRoutingClasses;

		oMetadataProxy[Symbol("isProxy")] = true;

		return oMetadataProxy;

	}
Utility function which creates a metadata proxy object for the given
metadata object

@param {sap.ui.core.ComponentMetadata} oMetadata the Component metadata
@param {sap.ui.core.Manifest} oManifest the manifest
@return {sap.ui.core.ComponentMetadata} a metadata proxy object