<?xml version="1.0" encoding="UTF-8"?><templates><template autoinsert="true" context="com.powerflasher.fdt.ui.editor.template.as3" deleted="false" description="Creates complete Singleton" enabled="true" name="singleton">package ${enclosing_package} {
	
	/**
	 * @author ${user}
	 */
	public class ${enclosing_type} {
		
		private static var _instance : ${enclosing_type};
		private static function hidden() : void {}

		public static function getInstance() : ${enclosing_type} {
			if( _instance == null ) {
				_instance =
					new ${enclosing_type}(hidden);
			}
			return _instance;
		}

		public function ${enclosing_type} (h:Function) {
			if (h !== hidden) {
				throw new Error( "${enclosing_type} and can only be accessed through ${enclosing_type}.getInstance()" );
			}
		}
		
		${cursor}		
	}
}
</template></templates>