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

Function callees

__tests__/java-static-field-receivers.test.ts:143–150  ·  view source on GitHub ↗

Qualified names of what the method `name` in `file` calls.

(file: string, name: string)

Source from the content-addressed store, hash-verified

141
142/** Qualified names of what the method `name` in `file` calls. */
143function callees(file: string, name: string): string[] {
144 const from = cg.getNodesInFile(file).find((n) => n.kind === 'method' && n.name === name)!;
145 return cg
146 .getOutgoingEdgesFrom([from.id])
147 .filter((e) => e.kind === 'calls')
148 .map((e) => cg.getNode(e.target)!.qualifiedName)
149 .sort();
150}
151
152describe('Java: an interface constant', () => {
153 it('is indexed, as a static final field is', () => {

Calls 4

mapMethod · 0.80
getNodeMethod · 0.80
getNodesInFileMethod · 0.65
getOutgoingEdgesFromMethod · 0.45

Tested by

no test coverage detected