function createInheritanceTree() {

	function makeDoclet(longname, lines) {
		lines.push("@name " + longname);
		var newDoclet = new doclet.Doclet("/**\n * " + lines.join("\n * ") + "\n */", {});
		newDoclet.__ui5 = {};
		__longnames[longname] = newDoclet;
		__db.insert(newDoclet);
		return newDoclet;
	}

	info("create inheritance tree (" + __db().count() + " symbols)");

	var oTypes = __db(function() { return supportsInheritance(this); });
	var aRootTypes = [];

	var oObject = lookup("Object");
	if ( !oObject ) {
		oObject = makeDoclet("Object", [
			"@class",
			"@synthetic",
			"@public"
		]);
		aRootTypes.push(oObject);
	}

	function getOrCreateClass(sClass, sExtendingClass) {
		var oClass = lookup(sClass);
		if ( !oClass ) {
			warning("create missing class " + sClass + " (extended by " + sExtendingClass + ")");
			var sBaseClass = 'Object';
			if ( externalSymbols[sClass] ) {
				sBaseClass = externalSymbols[sClass].extends || sBaseClass;
			}
			var oBaseClass = getOrCreateClass(sBaseClass, sClass);
			oClass = makeDoclet(sClass, [
				"@extends " + sBaseClass,
				"@class",
				"@synthetic",
				"@public"
			]);
			oClass.__ui5.base = oBaseClass;
			oBaseClass.__ui5.derived = oBaseClass.__ui5.derived || [];
			oBaseClass.__ui5.derived.push(oClass);
		}
		return oClass;
	}

	// link them according to the inheritance infos
	oTypes.each(function(oClass) {

		if ( oClass.longname === 'Object') {
			return;
		}

		var sBaseClass = "Object";
		if ( oClass.augments && oClass.augments.length > 0 ) {
			if ( oClass.augments.length > 1 ) {
				warning("multiple inheritance detected in " + oClass.longname);
			}
			sBaseClass = oClass.augments[0];
		} else {
			aRootTypes.push(oClass);
		}

		var oBaseClass = getOrCreateClass(sBaseClass, oClass.longname);
		oClass.__ui5.base = oBaseClass;
		oBaseClass.__ui5.derived = oBaseClass.__ui5.derived || [];
		oBaseClass.__ui5.derived.push(oClass);

		if ( oClass.implements ) {
			for (var j = 0; j < oClass.implements.length; j++) {
				var oInterface = lookup(oClass.implements[j]);
				if ( !oInterface ) {
					warning("create missing interface " + oClass.implements[j]);
					oInterface = makeDoclet(oClass.implements[j], [
						"@extends Object",
						"@interface",
						"@synthetic",
						"@public"
					]);
					oInterface.__ui5.base = oObject;
					oObject.__ui5.derived = oObject.__ui5.derived || [];
					oObject.__ui5.derived.push(oInterface);
				}
				oInterface.__ui5.implementations = oInterface.__ui5.implementations || [];
				oInterface.__ui5.implementations.push(oClass);
			}
		}
	});

	function setStereotype(oSymbol, sStereotype) {
		if ( !oSymbol ) {
			return;
		}
		oSymbol.__ui5.stereotype = sStereotype;
		var derived = oSymbol.__ui5.derived;
		if ( derived ) {
			for (var i = 0; i < derived.length; i++ ) {
				if ( !derived[i].__ui5.stereotype ) {
					setStereotype(derived[i], sStereotype);
				}
			}
		}
	}

	setStereotype(lookup("sap.ui.core.Component"), "component");
	setStereotype(lookup("sap.ui.core.Control"), "control");
	setStereotype(lookup("sap.ui.core.Element"), "element");
	setStereotype(lookup("sap.ui.base.Object"), "object");

	// check for cyclic inheritance (not supported)
	// Note: the check needs to run bottom up, not top down as a typical cyclic dependency never will end at the root node
	oTypes.each(function(oStartClass) {
		var visited = {};
		function visit(oClass) {
			if ( visited[oClass.longname] ) {
				throw new Error("cyclic inheritance detected: " + JSON.stringify(Object.keys(visited)));
			}
			if ( oClass.__ui5.base ) {
				visited[oClass.longname] = true;
				visit(oClass.__ui5.base);
				delete visited[oClass.longname];
			}
		}
		visit(oStartClass);
	});

	// collect root nodes (and ignore pure packages)
	return aRootTypes;
	/*
	return __db(function() {
		return R_KINDS.test(this.kind) && this.__ui5 && this.__ui5.base == null;
	}).get();
	*/
}
function createInheritanceTree() {

	function makeDoclet(longname, lines) {
		lines.push("@name " + longname);
		var newDoclet = new doclet.Doclet("/**\n * " + lines.join("\n * ") + "\n */", {});
		newDoclet.__ui5 = {};
		__longnames[longname] = newDoclet;
		__db.insert(newDoclet);
		return newDoclet;
	}

	info("create inheritance tree (" + __db().count() + " symbols)");

	var oTypes = __db(function() { return supportsInheritance(this); });
	var aRootTypes = [];

	var oObject = lookup("Object");
	if ( !oObject ) {
		oObject = makeDoclet("Object", [
			"@class",
			"@synthetic",
			"@public"
		]);
		aRootTypes.push(oObject);
	}

	function getOrCreateClass(sClass, sExtendingClass) {
		var oClass = lookup(sClass);
		if ( !oClass ) {
			warning("create missing class " + sClass + " (extended by " + sExtendingClass + ")");
			var sBaseClass = 'Object';
			if ( externalSymbols[sClass] ) {
				sBaseClass = externalSymbols[sClass].extends || sBaseClass;
			}
			var oBaseClass = getOrCreateClass(sBaseClass, sClass);
			oClass = makeDoclet(sClass, [
				"@extends " + sBaseClass,
				"@class",
				"@synthetic",
				"@public"
			]);
			oClass.__ui5.base = oBaseClass;
			oBaseClass.__ui5.derived = oBaseClass.__ui5.derived || [];
			oBaseClass.__ui5.derived.push(oClass);
		}
		return oClass;
	}

	// link them according to the inheritance infos
	oTypes.each(function(oClass) {

		if ( oClass.longname === 'Object') {
			return;
		}

		var sBaseClass = "Object";
		if ( oClass.augments && oClass.augments.length > 0 ) {
			if ( oClass.augments.length > 1 ) {
				warning("multiple inheritance detected in " + oClass.longname);
			}
			sBaseClass = oClass.augments[0];
		} else {
			aRootTypes.push(oClass);
		}

		var oBaseClass = getOrCreateClass(sBaseClass, oClass.longname);
		oClass.__ui5.base = oBaseClass;
		oBaseClass.__ui5.derived = oBaseClass.__ui5.derived || [];
		oBaseClass.__ui5.derived.push(oClass);

		if ( oClass.implements ) {
			for (var j = 0; j < oClass.implements.length; j++) {
				var oInterface = lookup(oClass.implements[j]);
				if ( !oInterface ) {
					warning("create missing interface " + oClass.implements[j]);
					oInterface = makeDoclet(oClass.implements[j], [
						"@extends Object",
						"@interface",
						"@synthetic",
						"@public"
					]);
					oInterface.__ui5.base = oObject;
					oObject.__ui5.derived = oObject.__ui5.derived || [];
					oObject.__ui5.derived.push(oInterface);
				}
				oInterface.__ui5.implementations = oInterface.__ui5.implementations || [];
				oInterface.__ui5.implementations.push(oClass);
			}
		}
	});

	function setStereotype(oSymbol, sStereotype) {
		if ( !oSymbol ) {
			return;
		}
		oSymbol.__ui5.stereotype = sStereotype;
		var derived = oSymbol.__ui5.derived;
		if ( derived ) {
			for (var i = 0; i < derived.length; i++ ) {
				if ( !derived[i].__ui5.stereotype ) {
					setStereotype(derived[i], sStereotype);
				}
			}
		}
	}

	setStereotype(lookup("sap.ui.core.Component"), "component");
	setStereotype(lookup("sap.ui.core.Control"), "control");
	setStereotype(lookup("sap.ui.core.Element"), "element");
	setStereotype(lookup("sap.ui.base.Object"), "object");

	// check for cyclic inheritance (not supported)
	// Note: the check needs to run bottom up, not top down as a typical cyclic dependency never will end at the root node
	oTypes.each(function(oStartClass) {
		var visited = {};
		function visit(oClass) {
			if ( visited[oClass.longname] ) {
				throw new Error("cyclic inheritance detected: " + JSON.stringify(Object.keys(visited)));
			}
			if ( oClass.__ui5.base ) {
				visited[oClass.longname] = true;
				visit(oClass.__ui5.base);
				delete visited[oClass.longname];
			}
		}
		visit(oStartClass);
	});

	// collect root nodes (and ignore pure packages)
	return aRootTypes;
	/*
	return __db(function() {
		return R_KINDS.test(this.kind) && this.__ui5 && this.__ui5.base == null;
	}).get();
	*/
}
function createInheritanceTree ( ) { function makeDoclet ( longname , lines ) { lines . push ( "@name " + longname ) ; var newDoclet = new doclet . Doclet ( "/**\n * " + lines . join ( "\n * " ) + "\n */" , { } ) ; newDoclet . __ui5 = { } ; __longnames [ longname ] = newDoclet ; __db . insert ( newDoclet ) ; return newDoclet ; } info ( "create inheritance tree (" + __db ( ) . count ( ) + " symbols)" ) ; var oTypes = __db ( function ( ) { return supportsInheritance ( this ) ; } ) ; var aRootTypes = [ ] ; var oObject = lookup ( "Object" ) ; if ( ! oObject ) { oObject = makeDoclet ( "Object" , [ "@class" , "@synthetic" , "@public" ] ) ; aRootTypes . push ( oObject ) ; } function getOrCreateClass ( sClass , sExtendingClass ) { var oClass = lookup ( sClass ) ; if ( ! oClass ) { warning ( "create missing class " + sClass + " (extended by " + sExtendingClass + ")" ) ; var sBaseClass = 'Object' ; if ( externalSymbols [ sClass ] ) { sBaseClass = externalSymbols [ sClass ] . extends || sBaseClass ; } var oBaseClass = getOrCreateClass ( sBaseClass , sClass ) ; oClass = makeDoclet ( sClass , [ "@extends " + sBaseClass , "@class" , "@synthetic" , "@public" ] ) ; oClass . __ui5 . base = oBaseClass ; oBaseClass . __ui5 . derived = oBaseClass . __ui5 . derived || [ ] ; oBaseClass . __ui5 . derived . push ( oClass ) ; } return oClass ; } // link them according to the inheritance infos oTypes . each ( function ( oClass ) { if ( oClass . longname === 'Object' ) { return ; } var sBaseClass = "Object" ; if ( oClass . augments && oClass . augments . length > 0 ) { if ( oClass . augments . length > 1 ) { warning ( "multiple inheritance detected in " + oClass . longname ) ; } sBaseClass = oClass . augments [ 0 ] ; } else { aRootTypes . push ( oClass ) ; } var oBaseClass = getOrCreateClass ( sBaseClass , oClass . longname ) ; oClass . __ui5 . base = oBaseClass ; oBaseClass . __ui5 . derived = oBaseClass . __ui5 . derived || [ ] ; oBaseClass . __ui5 . derived . push ( oClass ) ; if ( oClass . implements ) { for ( var j = 0 ; j < oClass . implements . length ; j ++ ) { var oInterface = lookup ( oClass . implements [ j ] ) ; if ( ! oInterface ) { warning ( "create missing interface " + oClass . implements [ j ] ) ; oInterface = makeDoclet ( oClass . implements [ j ] , [ "@extends Object" , "@interface" , "@synthetic" , "@public" ] ) ; oInterface . __ui5 . base = oObject ; oObject . __ui5 . derived = oObject . __ui5 . derived || [ ] ; oObject . __ui5 . derived . push ( oInterface ) ; } oInterface . __ui5 . implementations = oInterface . __ui5 . implementations || [ ] ; oInterface . __ui5 . implementations . push ( oClass ) ; } } } ) ; function setStereotype ( oSymbol , sStereotype ) { if ( ! oSymbol ) { return ; } oSymbol . __ui5 . stereotype = sStereotype ; var derived = oSymbol . __ui5 . derived ; if ( derived ) { for ( var i = 0 ; i < derived . length ; i ++ ) { if ( ! derived [ i ] . __ui5 . stereotype ) { setStereotype ( derived [ i ] , sStereotype ) ; } } } } setStereotype ( lookup ( "sap.ui.core.Component" ) , "component" ) ; setStereotype ( lookup ( "sap.ui.core.Control" ) , "control" ) ; setStereotype ( lookup ( "sap.ui.core.Element" ) , "element" ) ; setStereotype ( lookup ( "sap.ui.base.Object" ) , "object" ) ; // check for cyclic inheritance (not supported) // Note: the check needs to run bottom up, not top down as a typical cyclic dependency never will end at the root node oTypes . each ( function ( oStartClass ) { var visited = { } ; function visit ( oClass ) { if ( visited [ oClass . longname ] ) { throw new Error ( "cyclic inheritance detected: " + JSON . stringify ( Object . keys ( visited ) ) ) ; } if ( oClass . __ui5 . base ) { visited [ oClass . longname ] = true ; visit ( oClass . __ui5 . base ) ; delete visited [ oClass . longname ] ; } } visit ( oStartClass ) ; } ) ; // collect root nodes (and ignore pure packages) return aRootTypes ; /*
	return __db(function() {
		return R_KINDS.test(this.kind) && this.__ui5 && this.__ui5.base == null;
	}).get();
	*/ }
---- inheritance hierarchy ---------------------------------------------------------------------------- /*
Calculates the inheritance hierarchy for all class/interface/namespace symbols.
Each node in the tree has the content

Node : {
longname  : {string}     // name of the node (usually equals symbol.longname)
symbol    : {Symbol}     // backlink to the original symbol
base      : {Node}       // parent node or undefined for root nodes
derived   : {Node[]}     // subclasses/-types
}
---- inheritance hierarchy ---------------------------------------------------------------------------- / * Calculates the inheritance hierarchy for all class / interface / namespace symbols . Each node in the tree has the content
Creates a tree of inheritance symbols.