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

Function box_primitive

internal/cbm/lsp/java_lsp.c:255–270  ·  view source on GitHub ↗

Map primitive name → boxed wrapper QN. */

Source from the content-addressed store, hash-verified

253
254/* Map primitive name → boxed wrapper QN. */
255static const CBMType *box_primitive(CBMArena *a, const char *prim) {
256 if (!prim)
257 return cbm_type_unknown();
258 static const char *map[][2] = {
259 {"boolean", "java.lang.Boolean"}, {"byte", "java.lang.Byte"},
260 {"char", "java.lang.Character"}, {"short", "java.lang.Short"},
261 {"int", "java.lang.Integer"}, {"long", "java.lang.Long"},
262 {"float", "java.lang.Float"}, {"double", "java.lang.Double"},
263 {"void", "java.lang.Void"},
264 };
265 for (size_t i = 0; i < sizeof(map) / sizeof(map[0]); i++) {
266 if (strcmp(prim, map[i][0]) == 0)
267 return cbm_type_named(a, map[i][1]);
268 }
269 return cbm_type_unknown();
270}
271
272/* ── Initialization ───────────────────────────────────────────────── */
273

Callers

nothing calls this directly

Calls 2

cbm_type_unknownFunction · 0.85
cbm_type_namedFunction · 0.85

Tested by

no test coverage detected