src/sap.ui.core/src/sap/ui/core/XMLTemplateProcessor.js
function findControlClass(sNamespaceURI, sLocalName) {
			var sClassName;
			var mLibraries = sap.ui.getCore().getLoadedLibraries();
			jQuery.each(mLibraries, function(sLibName, oLibrary) {
				if ( sNamespaceURI === oLibrary.namespace || sNamespaceURI === oLibrary.name ) {
					sClassName = oLibrary.name + "." + ((oLibrary.tagNames && oLibrary.tagNames[sLocalName]) || sLocalName);
				}
			});
			// TODO guess library from sNamespaceURI and load corresponding lib!?
			sClassName = sClassName || sNamespaceURI + "." + sLocalName;

			// ensure that control and library are loaded
			function getObjectFallback(oClassObject) {
				// some modules might not return a class definition, so we fallback to the global
				// this is against the AMD definition, but is required for backward compatibility
				if (!oClassObject) {
					Log.error("Control '" + sClassName + "' did not return a class definition from sap.ui.define.", "", "XMLTemplateProcessor");
					oClassObject = ObjectPath.get(sClassName);
				}
				if (!oClassObject) {
					Log.error("Can't find object class '" + sClassName + "' for XML-view", "", "XMLTemplateProcessor");
				}
				return oClassObject;
			}

			var sResourceName = sClassName.replace(/\./g, "/");
			var oClassObject = sap.ui.require(sResourceName);
			if (!oClassObject) {
				if (bAsync) {
					return new Promise(function(resolve) {
						sap.ui.require([sResourceName], function(oClassObject) {
							oClassObject = getObjectFallback(oClassObject);
							resolve(oClassObject);
						});
					});
				} else {
					oClassObject = sap.ui.requireSync(sResourceName);
					oClassObject = getObjectFallback(oClassObject);
				}
			}
			return oClassObject;
		}
function findControlClass(sNamespaceURI, sLocalName) {
			var sClassName;
			var mLibraries = sap.ui.getCore().getLoadedLibraries();
			jQuery.each(mLibraries, function(sLibName, oLibrary) {
				if ( sNamespaceURI === oLibrary.namespace || sNamespaceURI === oLibrary.name ) {
					sClassName = oLibrary.name + "." + ((oLibrary.tagNames && oLibrary.tagNames[sLocalName]) || sLocalName);
				}
			});
			// TODO guess library from sNamespaceURI and load corresponding lib!?
			sClassName = sClassName || sNamespaceURI + "." + sLocalName;

			// ensure that control and library are loaded
			function getObjectFallback(oClassObject) {
				// some modules might not return a class definition, so we fallback to the global
				// this is against the AMD definition, but is required for backward compatibility
				if (!oClassObject) {
					Log.error("Control '" + sClassName + "' did not return a class definition from sap.ui.define.", "", "XMLTemplateProcessor");
					oClassObject = ObjectPath.get(sClassName);
				}
				if (!oClassObject) {
					Log.error("Can't find object class '" + sClassName + "' for XML-view", "", "XMLTemplateProcessor");
				}
				return oClassObject;
			}

			var sResourceName = sClassName.replace(/\./g, "/");
			var oClassObject = sap.ui.require(sResourceName);
			if (!oClassObject) {
				if (bAsync) {
					return new Promise(function(resolve) {
						sap.ui.require([sResourceName], function(oClassObject) {
							oClassObject = getObjectFallback(oClassObject);
							resolve(oClassObject);
						});
					});
				} else {
					oClassObject = sap.ui.requireSync(sResourceName);
					oClassObject = getObjectFallback(oClassObject);
				}
			}
			return oClassObject;
		}
function findControlClass ( sNamespaceURI , sLocalName ) { var sClassName ; var mLibraries = sap . ui . getCore ( ) . getLoadedLibraries ( ) ; jQuery . each ( mLibraries , function ( sLibName , oLibrary ) { if ( sNamespaceURI === oLibrary . namespace || sNamespaceURI === oLibrary . name ) { sClassName = oLibrary . name + "." + ( ( oLibrary . tagNames && oLibrary . tagNames [ sLocalName ] ) || sLocalName ) ; } } ) ; // TODO guess library from sNamespaceURI and load corresponding lib!? sClassName = sClassName || sNamespaceURI + "." + sLocalName ; // ensure that control and library are loaded function getObjectFallback ( oClassObject ) { // some modules might not return a class definition, so we fallback to the global // this is against the AMD definition, but is required for backward compatibility if ( ! oClassObject ) { Log . error ( "Control '" + sClassName + "' did not return a class definition from sap.ui.define." , "" , "XMLTemplateProcessor" ) ; oClassObject = ObjectPath . get ( sClassName ) ; } if ( ! oClassObject ) { Log . error ( "Can't find object class '" + sClassName + "' for XML-view" , "" , "XMLTemplateProcessor" ) ; } return oClassObject ; } var sResourceName = sClassName . replace ( / \. / g , "/" ) ; var oClassObject = sap . ui . require ( sResourceName ) ; if ( ! oClassObject ) { if ( bAsync ) { return new Promise ( function ( resolve ) { sap . ui . require ( [ sResourceName ] , function ( oClassObject ) { oClassObject = getObjectFallback ( oClassObject ) ; resolve ( oClassObject ) ; } ) ; } ) ; } else { oClassObject = sap . ui . requireSync ( sResourceName ) ; oClassObject = getObjectFallback ( oClassObject ) ; } } return oClassObject ; }
Requests the control class if not loaded yet.
If the View is set to async=true, an async XHR is sent, otherwise a sync XHR.

@param {string} sNamespaceURI
@param {string} sLocalName
@returns {function|Promise|undefined} the loaded ControlClass plain or resolved from a Promise
Requests the control class if not loaded yet . If the View is set to async = true an async XHR is sent otherwise a sync XHR .