src/sap.ui.core/src/sap/ui/core/routing/TargetCache.js
function (oOptions, sType) {
				var oObject;

				try {
					if (sType === "Component" && !this.async) {
						Log.error("sap.ui.core.routing.Target doesn't support loading component in synchronous mode, please switch routing to async");
						throw new Error("sap.ui.core.routing.Target doesn't support loading component in synchronous mode, please switch routing to async");
					}

					if (!oOptions) {
						Log.error("the oOptions parameter of getObject is mandatory", this);
						throw new Error("the oOptions parameter of getObject is mandatory");
					}

					oObject = this._get(oOptions, sType);
				} catch (e) {
					return Promise.reject(e);
				}

				if (oObject instanceof Promise) {
					return oObject;
				} else if (oObject.isA("sap.ui.core.mvc.View")) {
					return oObject.loaded();
				} else {
					return Promise.resolve(oObject);
				}
			}
function (oOptions, sType) {
				var oObject;

				try {
					if (sType === "Component" && !this.async) {
						Log.error("sap.ui.core.routing.Target doesn't support loading component in synchronous mode, please switch routing to async");
						throw new Error("sap.ui.core.routing.Target doesn't support loading component in synchronous mode, please switch routing to async");
					}

					if (!oOptions) {
						Log.error("the oOptions parameter of getObject is mandatory", this);
						throw new Error("the oOptions parameter of getObject is mandatory");
					}

					oObject = this._get(oOptions, sType);
				} catch (e) {
					return Promise.reject(e);
				}

				if (oObject instanceof Promise) {
					return oObject;
				} else if (oObject.isA("sap.ui.core.mvc.View")) {
					return oObject.loaded();
				} else {
					return Promise.resolve(oObject);
				}
			}
function ( oOptions , sType ) { var oObject ; try { if ( sType === "Component" && ! this . async ) { Log . error ( "sap.ui.core.routing.Target doesn't support loading component in synchronous mode, please switch routing to async" ) ; throw new Error ( "sap.ui.core.routing.Target doesn't support loading component in synchronous mode, please switch routing to async" ) ; } if ( ! oOptions ) { Log . error ( "the oOptions parameter of getObject is mandatory" , this ) ; throw new Error ( "the oOptions parameter of getObject is mandatory" ) ; } oObject = this . _get ( oOptions , sType ) ; } catch ( e ) { return Promise . reject ( e ) ; } if ( oObject instanceof Promise ) { return oObject ; } else if ( oObject . isA ( "sap.ui.core.mvc.View" ) ) { return oObject . loaded ( ) ; } else { return Promise . resolve ( oObject ) ; } }
Returns a cached view or component, for a given name. If it does not exist yet, it will create the view or component with the provided options.
If you provide a "id" in the "oOptions", it will be prefixed with the id of the component.

@param {object} oOptions see {@link sap.ui.core.mvc.View.create} or {@link sap.ui.core.Component.create} for the documentation.
@param {string} oOptions.name If you do not use setView please see {@link sap.ui.core.mvc.View.create} or {@link sap.ui.core.Component.create} for the documentation.
This is used as a key in the cache of the view or component instance. If you want to retrieve a view or a component that has been given an alternative name in {@link #set},
you need to provide the same name here and you can skip all the other options.
@param {string} [oOptions.id] The id you pass into the options will be prefixed with the id of the component you pass into the constructor.
So you can retrieve the view later by calling the {@link sap.ui.core.UIComponent#byId} function of the UIComponent.
@param {string} sType whether the object is a "View" or "Component". Views and components are stored separately in the cache. This means that a view and a component instance
could be stored under the same name.
@return {Promise} A promise that is resolved when the view or component is loaded. The view or component instance will be passed to the resolve function.
@private
Returns a cached view or component for a given name . If it does not exist yet it will create the view or component with the provided options . If you provide a id in the oOptions it will be prefixed with the id of the component .