`Type#Type(..)` and `#Type(..)`: the constructors of that type alone; none * is inherited. A constructor the type has without declaring it (the default * one, a record's canonical one) has no node. */
| 2789 | * is inherited. A constructor the type has without declaring it (the default |
| 2790 | * one, a record's canonical one) has no node. */ |
| 2791 | static jr_res_t jr_java_ctor(const jr_ctx_t *c, int ent, const jr_ref_t *r, bool exact) { |
| 2792 | const jr_entity_t *e = &c->ix->ents[ent]; |
| 2793 | bool params = r->has_params; |
| 2794 | jr_found_t all = jr_members(c, ent, e->name, JR_SEL_CTORS, r); |
| 2795 | if (!params && all.count > 0) { |
| 2796 | return all.several ? jr_unres(CBM_DOCLINK_REASON_AMBIGUOUS) : jr_found_result(&all, exact); |
| 2797 | } |
| 2798 | if (params) { |
| 2799 | jr_found_t sel = jr_members(c, ent, e->name, JR_SEL_CTORS | JR_SEL_SIG, r); |
| 2800 | if (sel.count > 0) { |
| 2801 | return jr_found_result(&sel, exact); |
| 2802 | } |
| 2803 | if (sel.uncompared) { |
| 2804 | return jr_unres(CBM_DOCLINK_REASON_AMBIGUOUS); |
| 2805 | } |
| 2806 | } |
| 2807 | if (e->incomplete) { |
| 2808 | return jr_unres(CBM_DOCLINK_REASON_GRAPH_GAP); |
| 2809 | } |
| 2810 | if (all.count == 0 && all.invisible) { |
| 2811 | return jr_unres(CBM_DOCLINK_REASON_TEST_ONLY); |
| 2812 | } |
| 2813 | bool has_ctors = e->kind == 'c' || e->kind == 'e' || e->kind == 'r'; |
| 2814 | if (has_ctors && params && jr_record_canonical(c, ent, r)) { |
| 2815 | return jr_unres(CBM_DOCLINK_REASON_GRAPH_GAP); |
| 2816 | } |
| 2817 | if (has_ctors && all.count == 0 && (!params || (r->nparams == 0 && e->kind != 'r'))) { |
| 2818 | return jr_unres(CBM_DOCLINK_REASON_GRAPH_GAP); |
| 2819 | } |
| 2820 | return jr_unres(CBM_DOCLINK_REASON_MISSING); |
| 2821 | } |
| 2822 | |
| 2823 | /* A method reference's outcome from javadoc's search `w` from `base`; `vs`: |
| 2824 | * the field search that came first, if any. A search that ended at a method |
no test coverage detected