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

Method isInterfaceOwnedMethod

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

Source from the content-addressed store, hash-verified

4784 */
4785 const interfaceMemberCache = new Map<string, boolean>();
4786 const isInterfaceOwnedMethod = (node: Node): boolean => {
4787 if (node.kind !== 'method') return false;
4788 const cached = interfaceMemberCache.get(node.id);
4789 if (cached !== undefined) return cached;
4790 let owned = false;
4791 try {
4792 owned = cg.getIncomingEdges(node.id).some(
4793 (e) => e.kind === 'contains' && cg.getNode(e.source)?.kind === 'interface',
4794 );
4795 } catch {
4796 owned = false; // a probe failure must not manufacture a penalty
4797 }
4798 interfaceMemberCache.set(node.id, owned);
4799 return owned;
4800 };
4801
4802 const namedSeedIds = new Set<string>();
4803 // The subset of named seeds that earns the named-FIRST sort tier. We still

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