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

Method isInterfaceOwnedMethod

src/mcp/tools.ts:4981–4995  ·  view source on GitHub ↗
(node: Node)

Source from the content-addressed store, hash-verified

4979 */
4980 const interfaceMemberCache = new Map<string, boolean>();
4981 const isInterfaceOwnedMethod = (node: Node): boolean => {
4982 if (node.kind !== 'method') return false;
4983 const cached = interfaceMemberCache.get(node.id);
4984 if (cached !== undefined) return cached;
4985 let owned = false;
4986 try {
4987 owned = cg.getIncomingEdges(node.id).some(
4988 (e) => e.kind === 'contains' && cg.getNode(e.source)?.kind === 'interface',
4989 );
4990 } catch {
4991 owned = false; // a probe failure must not manufacture a penalty
4992 }
4993 interfaceMemberCache.set(node.id, owned);
4994 return owned;
4995 };
4996
4997 // The members the search matched as members (#3408; Subgraph.memberRoots),
4998 // and by their names in small letters.

Callers

nothing calls this directly

Calls 4

getNodeMethod · 0.80
getMethod · 0.65
getIncomingEdgesMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected