MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / jv_java_callable

Function jv_java_callable

internal/cbm/doclink_jvm.c:2187–2211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2185}
2186
2187static void jv_java_callable(jv_scan_t *s, TSNode decl, const char *k, const jv_frame_t *fr) {
2188 bool compact = strcmp(k, "compact_constructor_declaration") == 0;
2189 bool ctor = compact || strcmp(k, "constructor_declaration") == 0;
2190 TSNode body = jv_field(decl, "body");
2191 const char *raw = NULL;
2192 size_t raw_len = 0;
2193 const char *name = jv_name_of(s, jv_field(decl, "name"), &raw, &raw_len);
2194 if (!name || !jv_member_ok(s, decl, body, true, fr->inner_depth)) {
2195 return;
2196 }
2197 jv_member_seen(s, decl, body, true);
2198 uint32_t line = jv_line(decl);
2199 const jv_def_t *def = jv_def_match(s, line, raw, raw_len, 'c');
2200 jv_member_open(s, line, 'c', ctor ? "K" : "", fr, name);
2201 jv_put_tparams(s, jv_field(decl, "type_parameters"));
2202 jv_putc(&s->sb, '\t');
2203 if (compact) {
2204 jv_putc(&s->sb, '*'); /* the canonical constructor: the components' types */
2205 } else {
2206 jv_java_put_sig(s, jv_field(decl, "parameters"));
2207 }
2208 jv_puts(&s->sb, "\t\t");
2209 jv_put_slot(s, def, jv_join(s, fr->path, name));
2210 jv_puts(&s->sb, "\t\n");
2211}
2212
2213/* A field or constant declaration: one member per declarator. */
2214static void jv_java_fields(jv_scan_t *s, TSNode decl, const jv_frame_t *fr) {

Callers 1

jv_java_containerFunction · 0.85

Calls 13

jv_fieldFunction · 0.85
jv_name_ofFunction · 0.85
jv_member_okFunction · 0.85
jv_member_seenFunction · 0.85
jv_lineFunction · 0.85
jv_def_matchFunction · 0.85
jv_member_openFunction · 0.85
jv_put_tparamsFunction · 0.85
jv_putcFunction · 0.85
jv_java_put_sigFunction · 0.85
jv_putsFunction · 0.85
jv_put_slotFunction · 0.85

Tested by

no test coverage detected