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

Method isInterfaceOwnedMethod

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

Source from the content-addressed store, hash-verified

4966 */
4967 const interfaceMemberCache = new Map<string, boolean>();
4968 const isInterfaceOwnedMethod = (node: Node): boolean => {
4969 if (node.kind !== 'method') return false;
4970 const cached = interfaceMemberCache.get(node.id);
4971 if (cached !== undefined) return cached;
4972 let owned = false;
4973 try {
4974 owned = cg.getIncomingEdges(node.id).some(
4975 (e) => e.kind === 'contains' && cg.getNode(e.source)?.kind === 'interface',
4976 );
4977 } catch {
4978 owned = false; // a probe failure must not manufacture a penalty
4979 }
4980 interfaceMemberCache.set(node.id, owned);
4981 return owned;
4982 };
4983
4984 const namedSeedIds = new Set<string>();
4985 // 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