A CFML component's method by its lowercased name (CFML names ignore case): its own, else one a supertype has.
(cls: Node, lowerName: string, seen: Set<string>)
| 4288 | |
| 4289 | /** A CFML component's method by its lowercased name (CFML names ignore case): its own, else one a supertype has. */ |
| 4290 | private cfmlMethodOf(cls: Node, lowerName: string, seen: Set<string>): Node | undefined { |
| 4291 | if (seen.has(cls.id) || seen.size >= 8) return undefined; |
| 4292 | seen.add(cls.id); |
| 4293 | const own = this.context.getNodesInFile(cls.filePath).find((n) => |
| 4294 | n.kind === 'method' && |
| 4295 | n.name.toLowerCase() === lowerName && |
| 4296 | n.qualifiedName.toLowerCase() === `${cls.name}::${n.name}`.toLowerCase() && |
| 4297 | n.startLine >= cls.startLine && n.endLine <= cls.endLine |
| 4298 | ); |
| 4299 | if (own) return own; |
| 4300 | for (const supertype of this.context.getSupertypeNodes?.(cls.id) ?? []) { |
| 4301 | const inherited = this.cfmlMethodOf(supertype, lowerName, seen); |
| 4302 | if (inherited) return inherited; |
| 4303 | } |
| 4304 | return undefined; |
| 4305 | } |
| 4306 | |
| 4307 | /** |
| 4308 | * The file a CFML include names (#2651) — `include "x.cfm";`, |
no test coverage detected