docs: function FM(classManager){
  		'use strict';
   		var me = this;
  
   		this.getMissingClass = fileLoadeManager.getMissingClass;
  		// scriptArr is being used to contain all information of currently
  		// loaded JavaScript file.
  		var scriptArr = [];
  
  		me.basedir = "/javascript";
  		me.packages = {};
  		me.globaltransient = [];
  		me.directories = {};
  		// Keep track of loaded files in loadedScript.
  		var loadedScript = {};
  		var all_paths = [];
  		var all_temp_path = [];
  		// /onFileLoadError method get called when browser fail to load a javascript
  		// file.
  		function onFileLoadError( ) {
  			console.error("Unable to load file: " + this.src + ". Please check the file name and path.");
  			return false;
  		}
  
  		// Add imports for current loaded javascript file.
  		// Add imported javascript file for current class into scriptArr.
  		function addAddedFileInnScript(key, path, dot_path){
  			dot_path = dot_path || path;
  			// checking if same file imported twice for same Class.
  			if(!dot_path) return;
  			var script = scriptArr[scriptArr.length - 1];
  			if( !script ){
  				return;
  			}
  			var arr = script[key] ||  (script[key] = []);
  			if( arr.indexOf(dot_path) === -1 ) {
  				arr.push(dot_path);
  			}
  			return true;
  		};
  
  		var pathOnWatch = {}, constidsettimer;
  		function listenFileChange (path, dot_path) {
  			!pathOnWatch[path] && typeof global.reloadMe === "function" && require("fs").watchFile(path, {
  			    persistent : true,
  			    interval : 1000
  			}, function( ) {
  				clearTimeout(constidsettimer);
  				constidsettimer = setTimeout(x=>{
  					console.log(path);
  					global.reloadMe();
  				}, 1000)
  			});
  			pathOnWatch[path] = true;
  		}
  
  		var docHead;
  		// Create script tag inside head.
  		function include( path, isFromInclude, dot_path ) {
  			if(!path){
  				return;
  			}
  			all_paths.push(path)
  			if(isNode){
  				require(path);
  				listenFileChange(path);
  				if(isFromInclude){
  					fileLoadeManager.iamready(dot_path);
  				}
  				return;
  			}
  			if (fm.isConcatinated) {
  				fileLoadeManager.iamready(dot_path);
  				return;
  			}
  
  			if (!docHead) {
  				docHead = document.getElementsByTagName("head")[0];
  			}
  
  			// isNonfm && fm.holdReady(true);
  			var e = document.createElement("script");
  			// onerror is not supported by IE so this will throw exception only for
  			// non IE browsers.
  
  			if(me.version){
  				path += "?v=" + me.version;
  			}
  			e.onerror = onFileLoadError;
  			if(isFromInclude){
  				e.onload = function(){
  					fileLoadeManager.iamready(dot_path);
  					$(document).trigger('jsfm-iamready-'+ path.split("/").pop().replace(".js", ""), [path]);
  				};
  			}
  
  			e.src = path;
  			e.type = "text/javascript";
  			docHead.appendChild(e);
  		}
  
  		function getBaseDir (path){
  			var temp, path = path.split(".")[0];
  			if(me.packages[path]){
  				return me.packages[path];
  			}else{
  				return fm.basedir;
  			}
  		};
  
  		function stackTrace( message ) {
  			try {
  				if (message) {
  					console.error(message);
  				}
  				var a = arguments.callee, str = "";
  				while (a.caller) {
  					if (a.caller.getName) {
  						str += a.caller.getName() + " of " + a.caller.$Class + "\n";
  					}
  					else if (a.caller.name != "") {
  						str += a.caller.name + "\n";
  					}
  					a = a.caller;
  				}
  				console.error(str);
  				var k = ty;
  			}
  			catch (e) {
  				console.error(e.stack && e.stack.substring(e.stack.indexOf("\n")));
  				// System.out.println(e.stack &&
  				// e.stack.substring(e.stack.indexOf("\n")));
  			}
  		}
  
  		// callAfterDelay:Delay the call for classManager so that file get compiled
  		// completely.
  		// And classManager get all information about the function.
  		function startClassInit(noDelay) {
  
  			var script = scriptArr.pop(), data;
  
  			var temp = getBaseDir(script.packageName);
  
  			if (typeof loadedScript[temp  + script.Class] == 'object') {
  				data = loadedScript[temp  + script.Class];
  			}
  			loadedScript[temp  + script.Class] = true;
  			var temp;
  			if(noDelay) {
  				compiling_classes = compiling_classes || [];
  				compiling_classes.push({script:script, data:data});
  			}
  			while(temp = compiling_classes.shift()){
  				(function(temp){
  					fileLoadeManager.onAllFileLoad(temp.script.includes, function(){
  						classManager.init(temp.script, temp.data);
  					});
  				})(temp)
  			}
  			if(noDelay) {
  				return;
  			}
  			compiling_classes = [];
  			compiling_classes.push({script:script, data:data});
  			setTimeout(function( ) {
  				// Calling classManager after a short delay so that file get
  				// completely ready.
  				var temp;
  				while(temp = compiling_classes.shift()){
  					(function(temp){
  						fileLoadeManager.onAllFileLoad(temp.script.includes, function(){
  							classManager.init(temp.script, temp.data);
  						});
  					})(temp)
  				}
  				// fm.holdReady(false);
  			}, 0);
  
  		}
  
  		function completePath(path) {
  			let dotcount=0;
  			if(dotcount = path.match(/^\.+/)){
  				dotcount = dotcount[0].split(".").slice(0, -2);
  				let packageName = scriptArr[scriptArr.length - 1].packageName.split(".");
  				dotcount.forEach(x=>packageName.pop());
  				return packageName.join(".") + path.replace(/^\.+/, ".");
  			}
  			return path;
  		}
  
  		function Import( path ) { 
  			var dot_path = path;
  			path = completePath(path);
  			arguments[0] = path;
  			path = path.replace(/\s/g, "");
  			addAddedFileInnScript("imports", path);
  			path = handlePath.apply(this, arguments);
  			include(path, false, dot_path);
  			return this;
  		}
  
  		function reloadClass() {
  			var path = arguments[0];
  			var temp = getBaseDir (path);
  			if (loadedScript[temp+ path]) {
  				delete loadedScript[temp + path];
  			}
  			var o = fm.isExist(path);
  			if(o){
  				var packages = o.package;
  				delete packages[path.split(".").pop()];
  			}
  			path = temp + "/" + path.split(".").join("/") + ".js"
  			delete require.cache[require.resolve(path)]
  			Include.apply(this, arguments);
  		}
  
  		function reloadAll(start_classs) {
  			scriptArr = [];
  			all_paths.forEach(x=>{
  				delete require.cache[require.resolve(x)];
  			})
  			loadedScript = {};
  			var tt = fileLoadeManager.getAllClasses();
  
  			for(let t in tt){
  				let match;
  				if( (match = all_temp_path.filter(x=> x.match(new RegExp(t+"$", "i")) )).length==0) {
  					continue;
  				}
  				let index = all_temp_path.indexOf(match[0]);
  				all_temp_path.splice(index, 1);
  				let name = t.split(".").pop();
  				let obj = this.isExist(t);
  				obj && obj.__destroy && obj.__destroy(obj);
  				obj && (delete obj.package[name]);
  				delete tt[t];
  			}
  			console.log(all_temp_path.length, "all_temp_path", all_temp_path)
  			var handler = classManager.getAllShortHand();
  			handler.forEach(x=>{
  				delete (x.parent)[x.name];
  			})
  			handler.length = 0;
  			all_paths.length = 0;
  			delete require.cache[require.resolve(start_classs)];
  			require(start_classs);
  		}
  
  		function handlePath(){
  			var args = [];
  			for (var k =1; k < arguments.length; k++){
  				args.push(arguments[k]);
  			}
  			var path = arguments[0];
  			var temp = getBaseDir (path);
  			if (!loadedScript[temp+ path]) {
  				all_temp_path.push(temp+ path);
  				loadedScript[temp + path] = args || true;
  			}
  			else {
  				var exists= fm.isExist(path)
  				if(typeof args[args.length -1] == 'function' && exists){
  					args.pop()(exists);
  				}
  				else {
  					if(!isNode) {
  						$(document).trigger('jsfm-iamready-'+ path.split(".").pop());
  					}
  				}
  				return;
  			}
  
  			path = path.replace(/\s/g, "");
  			if (path.indexOf("http") != 0 && path.lastIndexOf(".js") != path.length - 3) {
  				path = temp + "/" + path.split(".").join("/") + ".js";
  				if(me.isMinified){
  					path += "min.js";
  				}
  			}
  			return path;
  		}
  
  		function CSS (path){
  			var link = document.createElement('link');
  			link.href = path;
  			link.type = "text/css";
  			link.rel = "stylesheet"
  			if (!docHead) {
  				docHead = document.getElementsByTagName("head")[0];
  			}
  			docHead.appendChild(link);
  		}
  
  		function Include(path) {
  			path = completePath(path);
  			arguments[0] = path;
  			path = handlePath.apply(this, arguments);
  			addAddedFileInnScript('includes', path, arguments[0]);
  			include(path, true, arguments[0]);
  			return this;
  		}
  
  		function Package( packageName ) {
  			//scriptArr.pop();
  			var script = {
  				packageName : packageName || ""
  			};
  			scriptArr.push(script);
  			return script;
  		}
  
  		function Base( baseClass ) {
  			baseClass = completePath(baseClass);
  			var script = scriptArr[scriptArr.length - 1];
  			script && (script.baseClass = baseClass) && this.Import(baseClass);
  			return this;
  		}
  
  		function Interface(path) {
  			var script = scriptArr[scriptArr.length - 1];
  			script.isInterface = true;
  			this.Class.apply(this, arguments);
  		}
  
  		function AbstractClass( ) {
  			var script = scriptArr[scriptArr.length - 1];
  			script.isAbstract = true;
  			this.Class.apply(this, arguments);
  		}
  
  		function Plugin () {
  			var script = scriptArr[scriptArr.length - 1];
  			script.plugins = script.plugins || [];
  			for ( var k = 0, len = arguments.length; k < len; k++) {
  				this.Import(arguments[k]);
  				script.plugins.push(arguments[k]);
  			}
  		}
  
  		function Implements( ) {
  			var script = scriptArr[scriptArr.length - 1];
  			script.interfaces = script.interfaces || [];
  			for ( var k = 0, len = arguments.length; k < len; k++) {
  				let path = completePath(arguments[k]);
  				arguments[k] = path;
  				this.Import(arguments[k]);
  				script.interfaces.push(arguments[k]);
  			}
  		}
  
  		function isExist( cls, CLass ) {
  			var s = cls.split(".");
  			var o = CLass || (isNode ? global: window);
  			for (var k=0,len=s.length;k<len;k++) {
  				if (!o[s[k]]) {
  					return false;
  				}
  				o = o[s[k]];
  			}
  
  			if(typeof o == 'function'){
  				return o;
  			}
  			return false;
  		}
  
  		function handleNewClass (klass, fun) {
  			var script = scriptArr[scriptArr.length - 1];
  			var o = null;
  			klass = klass.split(">");
  			script.className = klass[0].trim();
  			if(klass.length == 2) {
  				this.Base(klass[1].trim());
  			}
  			o = createObj("" + script.packageName);
  			script.Class = "" + (script.packageName == "" ? "" : script.packageName + ".") + script.className;
  			script.Package = o;
  			o[script.className] = fun;
  			startClassInit(true);
  		};
  
  		function Class(){
  			if (typeof arguments[1] === 'function') {
  				handleNewClass.apply(this, arguments);
  				return this;
  			}
  			var script = scriptArr[scriptArr.length - 1];
  			var a = arguments, o = null;
  			script.className = a[0];
  			if (a[1]) {
  				this.Base(a[1]);
  			}
  			o = createObj("" + script.packageName);
  			script.Class = "" + (script.packageName == "" ? "" : script.packageName + ".") + script.className;
  			script.Package = o;
  			startClassInit();
  		}
  
  
  		// me.stringToObject: map a string into object.
  		function stringToObject( classStr, Class ) {
  			Class = Class || window;
  			var classStrArr = classStr.split(".");
  			for ( var n = 0; Class && n < classStrArr.length; n++) {
  				Class = Class[classStrArr[n]];
  			}
  			return Class;
  		};
  
  
  		this.basedir = "/javascript";
  
  		this.globaltransient = [];
  
  		// /fm.import adds new javascript file to head of document. JAVA: import
  		this['import'] = this.Import = Import;
  
  		// /same as this.import but for non jfm files.
  		this['include'] = this.Include = Include;
  
  		// This should be first method to be called from jfm classes.JAVA:package
  		this["package"] = this.Package = Package;
  
  		// / this method Add base class for current Class.JAVA:extend
  		this['super'] = this['base'] = this.Base = Base;
  
  		// Set current script as Interface; JAVA:interface
  		this["interface"] = this.Interface = Interface;
  
  		this["plugin"] = this.Plugin = Plugin;
  
  		this['abstractClass'] = this.AbstractClass = AbstractClass;
  		// Add all implemented interface to class interface list. and import
  		// them.JAVA:implements
  		this['implements'] = this.Implements = Implements;
  		this['css'] = this.CSS = CSS;
  
  		this.isExist = isExist;
  
  		// fm.Class creates a jfm class.
  		this['class'] = this["Class"] = Class;
  
  		this['reloadClass'] = reloadClass;
  
  		this.reloadAll = reloadAll
  		this.stringToObject = stringToObject;
  		this.stackTrace = stackTrace;
  	}