/* tagletthrows.c generated by valac, the Vala compiler
 * generated from tagletthrows.vala, do not modify */

/* tagletthrows.vala
 *
 * Copyright (C) 2008-2009 Didier Villevalois
 * Copyright (C) 2008-2012 Florian Brosch
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 *
 * Author:
 * 	Didier 'Ptitjes Villevalois <ptitjes@free.fr>
 */

#include <glib.h>
#include <glib-object.h>
#include "valadoc.h"
#include <stdlib.h>
#include <string.h>
#include <valagee.h>

enum  {
	VALADOC_TAGLETS_THROWS_0_PROPERTY,
	VALADOC_TAGLETS_THROWS_ERROR_DOMAIN_NAME_PROPERTY,
	VALADOC_TAGLETS_THROWS_ERROR_DOMAIN_PROPERTY,
	VALADOC_TAGLETS_THROWS_NUM_PROPERTIES
};
static GParamSpec* valadoc_taglets_throws_properties[VALADOC_TAGLETS_THROWS_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _vala_iterable_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterable_unref (var), NULL)))

struct _ValadocTagletsThrowsPrivate {
	gchar* _error_domain_name;
	ValadocApiNode* _error_domain;
};


static gpointer valadoc_taglets_throws_parent_class = NULL;
static ValadocContentTagletIface * valadoc_taglets_throws_valadoc_content_taglet_parent_iface = NULL;
static ValadocContentBlockIface * valadoc_taglets_throws_valadoc_content_block_parent_iface = NULL;

#define VALADOC_TAGLETS_THROWS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), VALADOC_TAGLETS_TYPE_THROWS, ValadocTagletsThrowsPrivate))
static ValadocRule* valadoc_taglets_throws_real_get_parser_rule (ValadocContentTaglet* base, ValadocRule* run_rule);
static void __lambda131_ (ValadocTagletsThrows* self, ValadocToken* token, GError** error);
static void valadoc_taglets_throws_set_error_domain_name (ValadocTagletsThrows* self, const gchar* value);
static void ___lambda131__valadoc_token_type_action (ValadocToken* token, gpointer self, GError** error);
static void valadoc_taglets_throws_real_check (ValadocContentContentElement* base, ValadocApiTree* api_root, ValadocApiNode* container, const gchar* file_path, ValadocErrorReporter* reporter, ValadocSettings* settings);
static void valadoc_taglets_throws_set_error_domain (ValadocTagletsThrows* self, ValadocApiNode* value);
static void valadoc_taglets_throws_real_accept (ValadocContentContentElement* base, ValadocContentContentVisitor* visitor);
static ValaList* valadoc_taglets_throws_real_get_inheritable_documentation (ValadocContentTaglet* base);
static gboolean valadoc_taglets_throws_real_inheritable (ValadocContentTaglet* base, ValadocContentTaglet* taglet);
static ValadocContentContentElement* valadoc_taglets_throws_real_copy (ValadocContentContentElement* base, ValadocContentContentElement* new_parent);
G_GNUC_INTERNAL void valadoc_content_content_element_set_parent (ValadocContentContentElement* self, ValadocContentContentElement* value);
G_GNUC_INTERNAL ValadocContentBlockContent* valadoc_content_block_content_construct (GType object_type);
static void valadoc_taglets_throws_finalize (GObject * obj);
static void _vala_valadoc_taglets_throws_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_valadoc_taglets_throws_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);


static gpointer _g_object_ref0 (gpointer self) {
	return self ? g_object_ref (self) : NULL;
}


static void __lambda131_ (ValadocTagletsThrows* self, ValadocToken* token, GError** error) {
	ValadocToken* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	g_return_if_fail (token != NULL);
	_tmp0_ = token;
	_tmp1_ = valadoc_token_to_string (_tmp0_);
	_tmp2_ = _tmp1_;
	valadoc_taglets_throws_set_error_domain_name (self, _tmp2_);
	_g_free0 (_tmp2_);
}


static void ___lambda131__valadoc_token_type_action (ValadocToken* token, gpointer self, GError** error) {
	__lambda131_ ((ValadocTagletsThrows*) self, token, error);
}


static ValadocRule* valadoc_taglets_throws_real_get_parser_rule (ValadocContentTaglet* base, ValadocRule* run_rule) {
	ValadocTagletsThrows * self;
	ValadocRule* result = NULL;
	ValadocTokenType* _tmp0_;
	GObject* _tmp1_;
	GObject** _tmp2_;
	GObject** _tmp3_;
	gint _tmp3__length1;
	ValadocRule* _tmp4_;
	GObject** _tmp5_;
	GObject** _tmp6_;
	gint _tmp6__length1;
	ValadocRule* _tmp7_;
	ValadocTokenType* _tmp8_;
	ValadocTokenType* _tmp9_;
	ValadocTokenType* _tmp10_;
	ValadocRule* _tmp11_;
	GObject* _tmp12_;
	GObject** _tmp13_;
	GObject** _tmp14_;
	gint _tmp14__length1;
	ValadocRule* _tmp15_;
	ValadocRule* _tmp16_;
	self = (ValadocTagletsThrows*) base;
	g_return_val_if_fail (run_rule != NULL, NULL);
	_tmp0_ = valadoc_token_type_SPACE;
	_tmp1_ = _g_object_ref0 ((GObject*) _tmp0_);
	_tmp2_ = g_new0 (GObject*, 1 + 1);
	_tmp2_[0] = _tmp1_;
	_tmp3_ = _tmp2_;
	_tmp3__length1 = 1;
	_tmp4_ = valadoc_rule_many (_tmp3_, 1);
	_tmp5_ = g_new0 (GObject*, 1 + 1);
	_tmp5_[0] = (GObject*) _tmp4_;
	_tmp6_ = _tmp5_;
	_tmp6__length1 = 1;
	_tmp7_ = valadoc_rule_option (_tmp6_, 1);
	_tmp8_ = valadoc_token_type_any_word ();
	_tmp9_ = _tmp8_;
	_tmp10_ = valadoc_token_type_action (_tmp9_, ___lambda131__valadoc_token_type_action, self);
	_tmp11_ = run_rule;
	_tmp12_ = _g_object_ref0 ((GObject*) _tmp11_);
	_tmp13_ = g_new0 (GObject*, 3 + 1);
	_tmp13_[0] = (GObject*) _tmp7_;
	_tmp13_[1] = (GObject*) _tmp10_;
	_tmp13_[2] = _tmp12_;
	_tmp14_ = _tmp13_;
	_tmp14__length1 = 3;
	_tmp15_ = valadoc_rule_seq (_tmp14_, 3);
	_tmp16_ = _tmp15_;
	_tmp14_ = (_vala_array_free (_tmp14_, _tmp14__length1, (GDestroyNotify) g_object_unref), NULL);
	_g_object_unref0 (_tmp9_);
	_tmp6_ = (_vala_array_free (_tmp6_, _tmp6__length1, (GDestroyNotify) g_object_unref), NULL);
	_tmp3_ = (_vala_array_free (_tmp3_, _tmp3__length1, (GDestroyNotify) g_object_unref), NULL);
	result = _tmp16_;
	return result;
}


static gpointer _vala_iterable_ref0 (gpointer self) {
	return self ? vala_iterable_ref (self) : NULL;
}


static void valadoc_taglets_throws_real_check (ValadocContentContentElement* base, ValadocApiTree* api_root, ValadocApiNode* container, const gchar* file_path, ValadocErrorReporter* reporter, ValadocSettings* settings) {
	ValadocTagletsThrows * self;
	gboolean _tmp0_ = FALSE;
	ValadocApiNode* _tmp1_;
	ValadocApiTree* _tmp15_;
	ValadocApiNode* _tmp16_;
	const gchar* _tmp17_;
	ValadocApiNode* _tmp18_;
	ValadocApiNode* _tmp19_;
	ValadocApiNode* _tmp20_;
	ValaList* exceptions = NULL;
	ValadocApiNode* _tmp34_;
	ValadocApiNodeType* _tmp35_;
	ValadocApiNodeType* _tmp36_;
	gint _tmp36__length1;
	ValaList* _tmp37_;
	ValaList* _tmp38_;
	ValadocApiItem* _tmp39_ = NULL;
	ValadocApiNode* _tmp40_;
	ValadocApiItem* expected_error_domain = NULL;
	ValadocApiItem* _tmp45_;
	gboolean report_warning = FALSE;
	gboolean _tmp63_;
	ValadocApiTree* _tmp72_;
	ValadocApiNode* _tmp73_;
	const gchar* _tmp74_;
	ValadocErrorReporter* _tmp75_;
	ValadocSettings* _tmp76_;
	self = (ValadocTagletsThrows*) base;
	g_return_if_fail (api_root != NULL);
	g_return_if_fail (container != NULL);
	g_return_if_fail (file_path != NULL);
	g_return_if_fail (reporter != NULL);
	g_return_if_fail (settings != NULL);
	_tmp1_ = container;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, VALADOC_API_TYPE_METHOD) == FALSE) {
		ValadocApiNode* _tmp2_;
		_tmp2_ = container;
		_tmp0_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, VALADOC_API_TYPE_DELEGATE) == FALSE;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		ValadocErrorReporter* _tmp3_;
		const gchar* _tmp4_;
		ValadocApiNode* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_;
		ValadocApiTree* _tmp10_;
		ValadocApiNode* _tmp11_;
		const gchar* _tmp12_;
		ValadocErrorReporter* _tmp13_;
		ValadocSettings* _tmp14_;
		_tmp3_ = reporter;
		_tmp4_ = file_path;
		_tmp5_ = container;
		_tmp6_ = valadoc_api_node_get_full_name (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = g_strdup_printf ("%s: %s: @throws", _tmp4_, _tmp7_);
		_tmp9_ = _tmp8_;
		valadoc_error_reporter_simple_warning (_tmp3_, _tmp9_, "@throws used outside method/delegate context");
		_g_free0 (_tmp9_);
		_g_free0 (_tmp7_);
		_tmp10_ = api_root;
		_tmp11_ = container;
		_tmp12_ = file_path;
		_tmp13_ = reporter;
		_tmp14_ = settings;
		VALADOC_CONTENT_CONTENT_ELEMENT_CLASS (valadoc_taglets_throws_parent_class)->check ((ValadocContentContentElement*) G_TYPE_CHECK_INSTANCE_CAST (self, VALADOC_CONTENT_TYPE_BLOCK_CONTENT, ValadocContentBlockContent), _tmp10_, _tmp11_, _tmp12_, _tmp13_, _tmp14_);
		return;
	}
	_tmp15_ = api_root;
	_tmp16_ = container;
	_tmp17_ = self->priv->_error_domain_name;
	_tmp18_ = valadoc_api_tree_search_symbol_str (_tmp15_, _tmp16_, _tmp17_);
	_tmp19_ = _tmp18_;
	valadoc_taglets_throws_set_error_domain (self, _tmp19_);
	_g_object_unref0 (_tmp19_);
	_tmp20_ = self->priv->_error_domain;
	if (_tmp20_ == NULL) {
		ValadocErrorReporter* _tmp21_;
		const gchar* _tmp22_;
		ValadocApiNode* _tmp23_;
		gchar* _tmp24_;
		gchar* _tmp25_;
		gchar* _tmp26_;
		gchar* _tmp27_;
		const gchar* _tmp28_;
		ValadocApiTree* _tmp29_;
		ValadocApiNode* _tmp30_;
		const gchar* _tmp31_;
		ValadocErrorReporter* _tmp32_;
		ValadocSettings* _tmp33_;
		_tmp21_ = reporter;
		_tmp22_ = file_path;
		_tmp23_ = container;
		_tmp24_ = valadoc_api_node_get_full_name (_tmp23_);
		_tmp25_ = _tmp24_;
		_tmp26_ = g_strdup_printf ("%s: %s: @throws", _tmp22_, _tmp25_);
		_tmp27_ = _tmp26_;
		_tmp28_ = self->priv->_error_domain_name;
		valadoc_error_reporter_simple_error (_tmp21_, _tmp27_, "`%s' does not exist", _tmp28_);
		_g_free0 (_tmp27_);
		_g_free0 (_tmp25_);
		_tmp29_ = api_root;
		_tmp30_ = container;
		_tmp31_ = file_path;
		_tmp32_ = reporter;
		_tmp33_ = settings;
		VALADOC_CONTENT_CONTENT_ELEMENT_CLASS (valadoc_taglets_throws_parent_class)->check ((ValadocContentContentElement*) G_TYPE_CHECK_INSTANCE_CAST (self, VALADOC_CONTENT_TYPE_BLOCK_CONTENT, ValadocContentBlockContent), _tmp29_, _tmp30_, _tmp31_, _tmp32_, _tmp33_);
		return;
	}
	_tmp34_ = container;
	_tmp35_ = g_new0 (ValadocApiNodeType, 2);
	_tmp35_[0] = VALADOC_API_NODE_TYPE_ERROR_DOMAIN;
	_tmp35_[1] = VALADOC_API_NODE_TYPE_CLASS;
	_tmp36_ = _tmp35_;
	_tmp36__length1 = 2;
	_tmp37_ = valadoc_api_node_get_children_by_types (_tmp34_, _tmp36_, 2, FALSE);
	_tmp38_ = _tmp37_;
	_tmp36_ = (g_free (_tmp36_), NULL);
	exceptions = _tmp38_;
	_tmp40_ = self->priv->_error_domain;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp40_, VALADOC_API_TYPE_ERROR_CODE)) {
		ValadocApiNode* _tmp41_;
		ValadocApiItem* _tmp42_;
		ValadocApiItem* _tmp43_;
		_tmp41_ = self->priv->_error_domain;
		_tmp42_ = valadoc_api_item_get_parent ((ValadocApiItem*) _tmp41_);
		_tmp43_ = _tmp42_;
		_tmp39_ = _tmp43_;
	} else {
		ValadocApiNode* _tmp44_;
		_tmp44_ = self->priv->_error_domain;
		_tmp39_ = (ValadocApiItem*) _tmp44_;
	}
	_tmp45_ = _g_object_ref0 (_tmp39_);
	expected_error_domain = _tmp45_;
	report_warning = TRUE;
	{
		ValaList* _exception_list = NULL;
		ValaList* _tmp46_;
		ValaList* _tmp47_;
		gint _exception_size = 0;
		ValaList* _tmp48_;
		gint _tmp49_;
		gint _tmp50_;
		gint _exception_index = 0;
		_tmp46_ = exceptions;
		_tmp47_ = _vala_iterable_ref0 (_tmp46_);
		_exception_list = _tmp47_;
		_tmp48_ = _exception_list;
		_tmp49_ = vala_collection_get_size ((ValaCollection*) _tmp48_);
		_tmp50_ = _tmp49_;
		_exception_size = _tmp50_;
		_exception_index = -1;
		while (TRUE) {
			gint _tmp51_;
			gint _tmp52_;
			gint _tmp53_;
			ValadocApiNode* exception = NULL;
			ValaList* _tmp54_;
			gint _tmp55_;
			gpointer _tmp56_;
			gboolean _tmp57_ = FALSE;
			ValadocApiNode* _tmp58_;
			ValadocApiItem* _tmp59_;
			_tmp51_ = _exception_index;
			_exception_index = _tmp51_ + 1;
			_tmp52_ = _exception_index;
			_tmp53_ = _exception_size;
			if (!(_tmp52_ < _tmp53_)) {
				break;
			}
			_tmp54_ = _exception_list;
			_tmp55_ = _exception_index;
			_tmp56_ = vala_list_get (_tmp54_, _tmp55_);
			exception = (ValadocApiNode*) _tmp56_;
			_tmp58_ = exception;
			_tmp59_ = expected_error_domain;
			if (G_TYPE_CHECK_INSTANCE_CAST (_tmp58_, VALADOC_API_TYPE_ITEM, ValadocApiItem) == _tmp59_) {
				_tmp57_ = TRUE;
			} else {
				gboolean _tmp60_ = FALSE;
				ValadocApiNode* _tmp61_;
				_tmp61_ = exception;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp61_, VALADOC_API_TYPE_CLASS)) {
					ValadocApiItem* _tmp62_;
					_tmp62_ = expected_error_domain;
					_tmp60_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp62_, VALADOC_API_TYPE_ERROR_DOMAIN);
				} else {
					_tmp60_ = FALSE;
				}
				_tmp57_ = _tmp60_;
			}
			if (_tmp57_) {
				report_warning = FALSE;
				_g_object_unref0 (exception);
				break;
			}
			_g_object_unref0 (exception);
		}
		_vala_iterable_unref0 (_exception_list);
	}
	_tmp63_ = report_warning;
	if (_tmp63_) {
		ValadocErrorReporter* _tmp64_;
		const gchar* _tmp65_;
		ValadocApiNode* _tmp66_;
		gchar* _tmp67_;
		gchar* _tmp68_;
		gchar* _tmp69_;
		gchar* _tmp70_;
		const gchar* _tmp71_;
		_tmp64_ = reporter;
		_tmp65_ = file_path;
		_tmp66_ = container;
		_tmp67_ = valadoc_api_node_get_full_name (_tmp66_);
		_tmp68_ = _tmp67_;
		_tmp69_ = g_strdup_printf ("%s: %s: @throws", _tmp65_, _tmp68_);
		_tmp70_ = _tmp69_;
		_tmp71_ = self->priv->_error_domain_name;
		valadoc_error_reporter_simple_warning (_tmp64_, _tmp70_, "`%s' does not exist in exception list", _tmp71_);
		_g_free0 (_tmp70_);
		_g_free0 (_tmp68_);
	}
	_tmp72_ = api_root;
	_tmp73_ = container;
	_tmp74_ = file_path;
	_tmp75_ = reporter;
	_tmp76_ = settings;
	VALADOC_CONTENT_CONTENT_ELEMENT_CLASS (valadoc_taglets_throws_parent_class)->check ((ValadocContentContentElement*) G_TYPE_CHECK_INSTANCE_CAST (self, VALADOC_CONTENT_TYPE_BLOCK_CONTENT, ValadocContentBlockContent), _tmp72_, _tmp73_, _tmp74_, _tmp75_, _tmp76_);
	_g_object_unref0 (expected_error_domain);
	_vala_iterable_unref0 (exceptions);
}


static void valadoc_taglets_throws_real_accept (ValadocContentContentElement* base, ValadocContentContentVisitor* visitor) {
	ValadocTagletsThrows * self;
	ValadocContentContentVisitor* _tmp0_;
	self = (ValadocTagletsThrows*) base;
	g_return_if_fail (visitor != NULL);
	_tmp0_ = visitor;
	valadoc_content_content_visitor_visit_taglet (_tmp0_, (ValadocContentTaglet*) self);
}


static ValaList* valadoc_taglets_throws_real_get_inheritable_documentation (ValadocContentTaglet* base) {
	ValadocTagletsThrows * self;
	ValaList* result = NULL;
	ValaList* _tmp0_;
	ValaList* _tmp1_;
	ValaList* _tmp2_;
	self = (ValadocTagletsThrows*) base;
	_tmp0_ = valadoc_content_block_content_get_content ((ValadocContentBlockContent*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = _vala_iterable_ref0 (_tmp1_);
	result = _tmp2_;
	return result;
}


static gboolean valadoc_taglets_throws_real_inheritable (ValadocContentTaglet* base, ValadocContentTaglet* taglet) {
	ValadocTagletsThrows * self;
	gboolean result = FALSE;
	ValadocContentTaglet* _tmp0_;
	ValadocTagletsThrows* t = NULL;
	ValadocContentTaglet* _tmp1_;
	ValadocTagletsThrows* _tmp2_;
	gboolean _tmp3_ = FALSE;
	ValadocApiNode* _tmp4_;
	ValadocTagletsThrows* _tmp5_;
	ValadocApiNode* _tmp6_;
	self = (ValadocTagletsThrows*) base;
	g_return_val_if_fail (taglet != NULL, FALSE);
	_tmp0_ = taglet;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, VALADOC_TAGLETS_TYPE_THROWS) == FALSE) {
		result = FALSE;
		return result;
	}
	_tmp1_ = taglet;
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, VALADOC_TAGLETS_TYPE_THROWS, ValadocTagletsThrows));
	t = _tmp2_;
	_tmp4_ = self->priv->_error_domain;
	_tmp5_ = t;
	_tmp6_ = _tmp5_->priv->_error_domain;
	if (_tmp4_ == _tmp6_) {
		_tmp3_ = TRUE;
	} else {
		const gchar* _tmp7_;
		ValadocTagletsThrows* _tmp8_;
		const gchar* _tmp9_;
		_tmp7_ = self->priv->_error_domain_name;
		_tmp8_ = t;
		_tmp9_ = _tmp8_->priv->_error_domain_name;
		_tmp3_ = g_strcmp0 (_tmp7_, _tmp9_) == 0;
	}
	result = _tmp3_;
	_g_object_unref0 (t);
	return result;
}


static ValadocContentContentElement* valadoc_taglets_throws_real_copy (ValadocContentContentElement* base, ValadocContentContentElement* new_parent) {
	ValadocTagletsThrows * self;
	ValadocContentContentElement* result = NULL;
	ValadocTagletsThrows* tr = NULL;
	ValadocTagletsThrows* _tmp0_;
	ValadocTagletsThrows* _tmp1_;
	ValadocContentContentElement* _tmp2_;
	ValadocTagletsThrows* _tmp3_;
	const gchar* _tmp4_;
	ValadocTagletsThrows* _tmp5_;
	ValadocApiNode* _tmp6_;
	self = (ValadocTagletsThrows*) base;
	_tmp0_ = valadoc_taglets_throws_new ();
	tr = _tmp0_;
	_tmp1_ = tr;
	_tmp2_ = new_parent;
	valadoc_content_content_element_set_parent ((ValadocContentContentElement*) _tmp1_, _tmp2_);
	_tmp3_ = tr;
	_tmp4_ = self->priv->_error_domain_name;
	valadoc_taglets_throws_set_error_domain_name (_tmp3_, _tmp4_);
	_tmp5_ = tr;
	_tmp6_ = self->priv->_error_domain;
	valadoc_taglets_throws_set_error_domain (_tmp5_, _tmp6_);
	{
		ValaList* _element_list = NULL;
		ValaList* _tmp7_;
		ValaList* _tmp8_;
		ValaList* _tmp9_;
		gint _element_size = 0;
		ValaList* _tmp10_;
		gint _tmp11_;
		gint _tmp12_;
		gint _element_index = 0;
		_tmp7_ = valadoc_content_block_content_get_content ((ValadocContentBlockContent*) self);
		_tmp8_ = _tmp7_;
		_tmp9_ = _vala_iterable_ref0 (_tmp8_);
		_element_list = _tmp9_;
		_tmp10_ = _element_list;
		_tmp11_ = vala_collection_get_size ((ValaCollection*) _tmp10_);
		_tmp12_ = _tmp11_;
		_element_size = _tmp12_;
		_element_index = -1;
		while (TRUE) {
			gint _tmp13_;
			gint _tmp14_;
			gint _tmp15_;
			ValadocContentBlock* element = NULL;
			ValaList* _tmp16_;
			gint _tmp17_;
			gpointer _tmp18_;
			ValadocContentBlock* copy = NULL;
			ValadocContentBlock* _tmp19_;
			ValadocTagletsThrows* _tmp20_;
			ValadocContentContentElement* _tmp21_;
			ValadocContentBlock* _tmp22_;
			ValadocTagletsThrows* _tmp23_;
			ValaList* _tmp24_;
			ValaList* _tmp25_;
			ValadocContentBlock* _tmp26_;
			_tmp13_ = _element_index;
			_element_index = _tmp13_ + 1;
			_tmp14_ = _element_index;
			_tmp15_ = _element_size;
			if (!(_tmp14_ < _tmp15_)) {
				break;
			}
			_tmp16_ = _element_list;
			_tmp17_ = _element_index;
			_tmp18_ = vala_list_get (_tmp16_, _tmp17_);
			element = (ValadocContentBlock*) _tmp18_;
			_tmp19_ = element;
			_tmp20_ = tr;
			_tmp21_ = valadoc_content_content_element_copy ((ValadocContentContentElement*) _tmp19_, (ValadocContentContentElement*) _tmp20_);
			_tmp22_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp21_, VALADOC_CONTENT_TYPE_BLOCK) ? ((ValadocContentBlock*) _tmp21_) : NULL;
			if (_tmp22_ == NULL) {
				_g_object_unref0 (_tmp21_);
			}
			copy = _tmp22_;
			_tmp23_ = tr;
			_tmp24_ = valadoc_content_block_content_get_content ((ValadocContentBlockContent*) _tmp23_);
			_tmp25_ = _tmp24_;
			_tmp26_ = copy;
			vala_collection_add ((ValaCollection*) _tmp25_, _tmp26_);
			_g_object_unref0 (copy);
			_g_object_unref0 (element);
		}
		_vala_iterable_unref0 (_element_list);
	}
	result = (ValadocContentContentElement*) tr;
	return result;
}


ValadocTagletsThrows* valadoc_taglets_throws_construct (GType object_type) {
	ValadocTagletsThrows * self = NULL;
	self = (ValadocTagletsThrows*) valadoc_content_block_content_construct (object_type);
	return self;
}


ValadocTagletsThrows* valadoc_taglets_throws_new (void) {
	return valadoc_taglets_throws_construct (VALADOC_TAGLETS_TYPE_THROWS);
}


const gchar* valadoc_taglets_throws_get_error_domain_name (ValadocTagletsThrows* self) {
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_error_domain_name;
	result = _tmp0_;
	return result;
}


static void valadoc_taglets_throws_set_error_domain_name (ValadocTagletsThrows* self, const gchar* value) {
	g_return_if_fail (self != NULL);
	if (g_strcmp0 (value, valadoc_taglets_throws_get_error_domain_name (self)) != 0) {
		const gchar* _tmp0_;
		gchar* _tmp1_;
		_tmp0_ = value;
		_tmp1_ = g_strdup (_tmp0_);
		_g_free0 (self->priv->_error_domain_name);
		self->priv->_error_domain_name = _tmp1_;
		g_object_notify_by_pspec ((GObject *) self, valadoc_taglets_throws_properties[VALADOC_TAGLETS_THROWS_ERROR_DOMAIN_NAME_PROPERTY]);
	}
}


ValadocApiNode* valadoc_taglets_throws_get_error_domain (ValadocTagletsThrows* self) {
	ValadocApiNode* result;
	ValadocApiNode* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_error_domain;
	result = _tmp0_;
	return result;
}


static void valadoc_taglets_throws_set_error_domain (ValadocTagletsThrows* self, ValadocApiNode* value) {
	g_return_if_fail (self != NULL);
	if (valadoc_taglets_throws_get_error_domain (self) != value) {
		ValadocApiNode* _tmp0_;
		ValadocApiNode* _tmp1_;
		_tmp0_ = value;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_g_object_unref0 (self->priv->_error_domain);
		self->priv->_error_domain = _tmp1_;
		g_object_notify_by_pspec ((GObject *) self, valadoc_taglets_throws_properties[VALADOC_TAGLETS_THROWS_ERROR_DOMAIN_PROPERTY]);
	}
}


static void valadoc_taglets_throws_class_init (ValadocTagletsThrowsClass * klass) {
	valadoc_taglets_throws_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (ValadocTagletsThrowsPrivate));
	((ValadocContentContentElementClass *) klass)->check = (void (*) (ValadocContentContentElement *, ValadocApiTree*, ValadocApiNode*, const gchar*, ValadocErrorReporter*, ValadocSettings*)) valadoc_taglets_throws_real_check;
	((ValadocContentContentElementClass *) klass)->accept = (void (*) (ValadocContentContentElement *, ValadocContentContentVisitor*)) valadoc_taglets_throws_real_accept;
	((ValadocContentContentElementClass *) klass)->copy = (ValadocContentContentElement* (*) (ValadocContentContentElement *, ValadocContentContentElement*)) valadoc_taglets_throws_real_copy;
	G_OBJECT_CLASS (klass)->get_property = _vala_valadoc_taglets_throws_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_valadoc_taglets_throws_set_property;
	G_OBJECT_CLASS (klass)->finalize = valadoc_taglets_throws_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), VALADOC_TAGLETS_THROWS_ERROR_DOMAIN_NAME_PROPERTY, valadoc_taglets_throws_properties[VALADOC_TAGLETS_THROWS_ERROR_DOMAIN_NAME_PROPERTY] = g_param_spec_string ("error-domain-name", "error-domain-name", "error-domain-name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	/**
	 * Thrown  Error domain or Error code
	 */
	g_object_class_install_property (G_OBJECT_CLASS (klass), VALADOC_TAGLETS_THROWS_ERROR_DOMAIN_PROPERTY, valadoc_taglets_throws_properties[VALADOC_TAGLETS_THROWS_ERROR_DOMAIN_PROPERTY] = g_param_spec_object ("error-domain", "error-domain", "error-domain", VALADOC_API_TYPE_NODE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
}


static void valadoc_taglets_throws_valadoc_content_taglet_interface_init (ValadocContentTagletIface * iface) {
	valadoc_taglets_throws_valadoc_content_taglet_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_parser_rule = (ValadocRule* (*) (ValadocContentTaglet *, ValadocRule*)) valadoc_taglets_throws_real_get_parser_rule;
	iface->get_inheritable_documentation = (ValaList* (*) (ValadocContentTaglet *)) valadoc_taglets_throws_real_get_inheritable_documentation;
	iface->inheritable = (gboolean (*) (ValadocContentTaglet *, ValadocContentTaglet*)) valadoc_taglets_throws_real_inheritable;
}


static void valadoc_taglets_throws_valadoc_content_block_interface_init (ValadocContentBlockIface * iface) {
	valadoc_taglets_throws_valadoc_content_block_parent_iface = g_type_interface_peek_parent (iface);
}


static void valadoc_taglets_throws_instance_init (ValadocTagletsThrows * self) {
	self->priv = VALADOC_TAGLETS_THROWS_GET_PRIVATE (self);
}


static void valadoc_taglets_throws_finalize (GObject * obj) {
	ValadocTagletsThrows * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALADOC_TAGLETS_TYPE_THROWS, ValadocTagletsThrows);
	_g_free0 (self->priv->_error_domain_name);
	_g_object_unref0 (self->priv->_error_domain);
	G_OBJECT_CLASS (valadoc_taglets_throws_parent_class)->finalize (obj);
}


GType valadoc_taglets_throws_get_type (void) {
	static volatile gsize valadoc_taglets_throws_type_id__volatile = 0;
	if (g_once_init_enter (&valadoc_taglets_throws_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ValadocTagletsThrowsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) valadoc_taglets_throws_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValadocTagletsThrows), 0, (GInstanceInitFunc) valadoc_taglets_throws_instance_init, NULL };
		static const GInterfaceInfo valadoc_content_taglet_info = { (GInterfaceInitFunc) valadoc_taglets_throws_valadoc_content_taglet_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo valadoc_content_block_info = { (GInterfaceInitFunc) valadoc_taglets_throws_valadoc_content_block_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType valadoc_taglets_throws_type_id;
		valadoc_taglets_throws_type_id = g_type_register_static (VALADOC_CONTENT_TYPE_BLOCK_CONTENT, "ValadocTagletsThrows", &g_define_type_info, 0);
		g_type_add_interface_static (valadoc_taglets_throws_type_id, VALADOC_CONTENT_TYPE_TAGLET, &valadoc_content_taglet_info);
		g_type_add_interface_static (valadoc_taglets_throws_type_id, VALADOC_CONTENT_TYPE_BLOCK, &valadoc_content_block_info);
		g_once_init_leave (&valadoc_taglets_throws_type_id__volatile, valadoc_taglets_throws_type_id);
	}
	return valadoc_taglets_throws_type_id__volatile;
}


static void _vala_valadoc_taglets_throws_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	ValadocTagletsThrows * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, VALADOC_TAGLETS_TYPE_THROWS, ValadocTagletsThrows);
	switch (property_id) {
		case VALADOC_TAGLETS_THROWS_ERROR_DOMAIN_NAME_PROPERTY:
		g_value_set_string (value, valadoc_taglets_throws_get_error_domain_name (self));
		break;
		case VALADOC_TAGLETS_THROWS_ERROR_DOMAIN_PROPERTY:
		g_value_set_object (value, valadoc_taglets_throws_get_error_domain (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_valadoc_taglets_throws_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	ValadocTagletsThrows * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, VALADOC_TAGLETS_TYPE_THROWS, ValadocTagletsThrows);
	switch (property_id) {
		case VALADOC_TAGLETS_THROWS_ERROR_DOMAIN_NAME_PROPERTY:
		valadoc_taglets_throws_set_error_domain_name (self, g_value_get_string (value));
		break;
		case VALADOC_TAGLETS_THROWS_ERROR_DOMAIN_PROPERTY:
		valadoc_taglets_throws_set_error_domain (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}



