signature.append (")", false);
- var exceptions = get_children_by_type (NodeType.ERROR_DOMAIN);
+ var exceptions = get_children_by_types ({NodeType.ERROR_DOMAIN, NodeType.CLASS});
if (exceptions.size > 0) {
signature.append_keyword ("throws");
first = true;
signature.append (")", false);
- var exceptions = get_children_by_type (NodeType.ERROR_DOMAIN);
+ var exceptions = get_children_by_types ({NodeType.ERROR_DOMAIN, NodeType.CLASS});
if (exceptions.size > 0) {
signature.append_keyword ("throws");
first = true;
return children;
}
+ public Gee.List<Node> get_children_by_types (NodeType[] types, bool filtered = true) {
+ var children = new ArrayList<Node> ();
+
+ foreach (NodeType type in types) {
+ children.add_all (get_children_by_type (type, filtered));
+ }
+
+ return children;
+ }
+
public void accept_children_by_type (NodeType type, Visitor visitor) {
Gee.List<Node> all_children = per_type_children.get (type);
if (all_children != null) {
write_package_note (node);
}
- if (!(node is Method || node is Delegate || node is Api.Signal)) { // avoids exception listings
+ if (!(node is Method || node is Delegate)) { // avoids exception listings
if (node.has_children ({
Api.NodeType.ERROR_CODE,
Api.NodeType.ENUM_VALUE,