function makeControlClass(sPrefix, sDefinition, sExtensionMethod, Base) {

		var sControlName = sPrefix + sDefinition + sExtensionMethod;
		var sRendererName = sControlName + "Renderer";

		if ( sExtensionMethod === "NoParent" ) {
			Base = Control;
		}

		var oResult = {
			controlName: sControlName,
			rendererName: sRendererName,
			controlClass: undefined,
			renderer: undefined
		};

		var renderFunction = function(oRM, oControl) {
			oRM.openStart("div", oControl);
			oRM.attr("type", sControlName);
			oRM.openEnd();
			oRM.close("div");
		};
		renderFunction.id = sControlName;

		function createRenderer() {
			switch (sExtensionMethod) {
			case "NoParent":
				var oRenderer = oResult.renderer = {
					render: renderFunction
				};
				ObjectPath.set(sRendererName, oRenderer);
				return oRenderer;
			case "LegacyExtend":
				var BaseRenderer = Base === Control ? Renderer : Base.getMetadata().getRenderer();
				var oRenderer = oResult.renderer = Renderer.extend(BaseRenderer);
				oRenderer.render = renderFunction;
				ObjectPath.set(sRendererName, oRenderer);
				return oRenderer;
			case "ModernExtend":
				var BaseRenderer = Base === Control ? Renderer : Base.getMetadata().getRenderer();
				if ( typeof BaseRenderer.extend === "function" ) {
					oResult.renderer = BaseRenderer.extend(sRendererName, {
						render: renderFunction
					});
				} else {
					oResult.renderer = Renderer.extend.call(BaseRenderer, sRendererName, {
						render: renderFunction
					});
				}
				return oResult.renderer;
			default:
				throw new Error("unknown extension mechanism " + sExtensionMethod);
			}
		}

		function createClassInfo() {
			switch (sDefinition) {
			case "RenderFunction":
				return {
					renderer: renderFunction
				};
			case "PlainRenderObject":
				return {
					renderer: {
						render: renderFunction
					}
				};
			case "ImplicitlyNamedRenderer":
				createRenderer();
				return {};
			case "ExplicitlyNamedRenderer":
				createRenderer();
				return {
					renderer: sRendererName
				};
			case "ImportedRenderer":
				return {
					renderer: createRenderer()
				};
			}
		}

		oResult.controlClass = Base.extend(sControlName, createClassInfo());
		return oResult;

	}
/*
	 * Creates a class by extending from the given base, using the given method of
	 * defining the renderer and the given way of extending the renderer from the base
	 * renderer. The name of the class will be composed from the given prefix and the
	 * sDefinition and sExtensionMethod.
	 */
Creates a class by extending from the given base, using the given method of
defining the renderer and the given way of extending the renderer from the base
renderer. The name of the class will be composed from the given prefix and the
sDefinition and sExtensionMethod.
Creates a class by extending from the given base using the given method of defining the renderer and the given way of extending the renderer from the base renderer . The name of the class will be composed from the given prefix and the sDefinition and sExtensionMethod .
function makeControlClass(sPrefix, sDefinition, sExtensionMethod, Base) {
		var sControlName = sPrefix + sDefinition + sExtensionMethod;
		var sRendererName = sControlName + "Renderer";
		if ( sExtensionMethod === "NoParent" ) {
			Base = Control;
		}
		var oResult = {
			controlName: sControlName,
			rendererName: sRendererName,
			controlClass: undefined,
			renderer: undefined
		};
		var renderFunction = function(oRM, oControl) {
			oRM.openStart("div", oControl);
			oRM.attr("type", sControlName);
			oRM.openEnd();
			oRM.close("div");
		};
		renderFunction.id = sControlName;
		function createRenderer() {
			switch (sExtensionMethod) {
			case "NoParent":
				var oRenderer = oResult.renderer = {
					render: renderFunction
				};
				ObjectPath.set(sRendererName, oRenderer);
				return oRenderer;
			case "LegacyExtend":
				var BaseRenderer = Base === Control ? Renderer : Base.getMetadata().getRenderer();
				var oRenderer = oResult.renderer = Renderer.extend(BaseRenderer);
				oRenderer.render = renderFunction;
				ObjectPath.set(sRendererName, oRenderer);
				return oRenderer;
			case "ModernExtend":
				var BaseRenderer = Base === Control ? Renderer : Base.getMetadata().getRenderer();
				if ( typeof BaseRenderer.extend === "function" ) {
					oResult.renderer = BaseRenderer.extend(sRendererName, {
						render: renderFunction
					});
				} else {
					oResult.renderer = Renderer.extend.call(BaseRenderer, sRendererName, {
						render: renderFunction
					});
				}
				return oResult.renderer;
			default:
				throw new Error("unknown extension mechanism " + sExtensionMethod);
			}
		}
		function createClassInfo() {
			switch (sDefinition) {
			case "RenderFunction":
				return {
					renderer: renderFunction
				};
			case "PlainRenderObject":
				return {
					renderer: {
						render: renderFunction
					}
				};
			case "ImplicitlyNamedRenderer":
				createRenderer();
				return {};
			case "ExplicitlyNamedRenderer":
				createRenderer();
				return {
					renderer: sRendererName
				};
			case "ImportedRenderer":
				return {
					renderer: createRenderer()
				};
			}
		}
		oResult.controlClass = Base.extend(sControlName, createClassInfo());
		return oResult;
	}
function makeControlClass ( sPrefix , sDefinition , sExtensionMethod , Base ) { var sControlName = sPrefix + sDefinition + sExtensionMethod ; var sRendererName = sControlName + "Renderer" ; if ( sExtensionMethod === "NoParent" ) { Base = Control ; } var oResult = { controlName : sControlName , rendererName : sRendererName , controlClass : undefined , renderer : undefined } ; var renderFunction = function ( oRM , oControl ) { oRM . openStart ( "div" , oControl ) ; oRM . attr ( "type" , sControlName ) ; oRM . openEnd ( ) ; oRM . close ( "div" ) ; } ; renderFunction . id = sControlName ; function createRenderer ( ) { switch ( sExtensionMethod ) { case "NoParent" : var oRenderer = oResult . renderer = { render : renderFunction } ; ObjectPath . set ( sRendererName , oRenderer ) ; return oRenderer ; case "LegacyExtend" : var BaseRenderer = Base === Control ? Renderer : Base . getMetadata ( ) . getRenderer ( ) ; var oRenderer = oResult . renderer = Renderer . extend ( BaseRenderer ) ; oRenderer . render = renderFunction ; ObjectPath . set ( sRendererName , oRenderer ) ; return oRenderer ; case "ModernExtend" : var BaseRenderer = Base === Control ? Renderer : Base . getMetadata ( ) . getRenderer ( ) ; if ( typeof BaseRenderer . extend === "function" ) { oResult . renderer = BaseRenderer . extend ( sRendererName , { render : renderFunction } ) ; } else { oResult . renderer = Renderer . extend . call ( BaseRenderer , sRendererName , { render : renderFunction } ) ; } return oResult . renderer ; default : throw new Error ( "unknown extension mechanism " + sExtensionMethod ) ; } } function createClassInfo ( ) { switch ( sDefinition ) { case "RenderFunction" : return { renderer : renderFunction } ; case "PlainRenderObject" : return { renderer : { render : renderFunction } } ; case "ImplicitlyNamedRenderer" : createRenderer ( ) ; return { } ; case "ExplicitlyNamedRenderer" : createRenderer ( ) ; return { renderer : sRendererName } ; case "ImportedRenderer" : return { renderer : createRenderer ( ) } ; } } oResult . controlClass = Base . extend ( sControlName , createClassInfo ( ) ) ; return oResult ; }
Creates a class by extending from the given base, using the given method of
 defining the renderer and the given way of extending the renderer from the base
 renderer.
Creates a class by extending from the given base using the given method of defining the renderer and the given way of extending the renderer from the base renderer .