MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / emitMethod

Function emitMethod

src/extraction/languages/java.ts:167–184  ·  view source on GitHub ↗
(
    name: string,
    anchor: SyntaxNode,
    signature: string,
    fromAnnotation: string,
    extra: { returnType?: string; isStatic?: boolean } = {}
  )

Source from the content-addressed store, hash-verified

165 const className = classRec?.name ?? getNodeText(classNameNode, ctx.source).trim();
166
167 const emitMethod = (
168 name: string,
169 anchor: SyntaxNode,
170 signature: string,
171 fromAnnotation: string,
172 extra: { returnType?: string; isStatic?: boolean } = {}
173 ): void => {
174 if (!name || takenMethods.has(name)) return;
175 takenMethods.add(name);
176 ctx.createNode('method', name, anchor, {
177 visibility: 'public',
178 signature,
179 docstring: `Lombok-generated (${fromAnnotation})`,
180 decorators: ['lombok'],
181 isStatic: extra.isStatic,
182 returnType: extra.returnType,
183 });
184 };
185
186 // Per-field getters/setters.
187 for (const fd of fields) {

Callers 1

synthesizeLombokMembersFunction · 0.85

Calls 3

hasMethod · 0.80
createNodeMethod · 0.65
addMethod · 0.45

Tested by

no test coverage detected