MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / getMethodString

Function getMethodString

hooks/modify-java-files.js:459–472  ·  view source on GitHub ↗
(method)

Source from the content-addressed store, hash-verified

457 }
458
459 function getMethodString(method) {
460 const params = method.params.map(param => {
461 return `${param.type} ${param.name}`;
462 }).join(', ');
463
464 let str = `${method.modifier} ${method.returnType} ${method.name}(${params})`;
465 if (method.notation) {
466 str = `\n${method.notation}\n${str}`;
467 }
468 if (method.body) {
469 return str + `{${method.body.join('')}}`;
470 }
471 return str + ';';
472 }
473
474 function getFieldString(field) {
475 return `${field.modifier} ${field.type} ${field.name}${field.value ? ` = ${field.value}` : ''};`;

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected