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>)
| 4067 | |
| 4068 | /** A CFML component's method by its lowercased name (CFML names ignore case): its own, else one a supertype has. */ |
| 4069 | private cfmlMethodOf(cls: Node, lowerName: string, seen: Set<string>): Node | undefined { |
| 4070 | if (seen.has(cls.id) || seen.size >= 8) return undefined; |
| 4071 | seen.add(cls.id); |
| 4072 | const own = this.context.getNodesInFile(cls.filePath).find((n) => |
| 4073 | n.kind === 'method' && |
| 4074 | n.name.toLowerCase() === lowerName && |
| 4075 | n.qualifiedName.toLowerCase() === `${cls.name}::${n.name}`.toLowerCase() && |
| 4076 | n.startLine >= cls.startLine && n.endLine <= cls.endLine |
| 4077 | ); |
| 4078 | if (own) return own; |
| 4079 | for (const supertype of this.context.getSupertypeNodes?.(cls.id) ?? []) { |
| 4080 | const inherited = this.cfmlMethodOf(supertype, lowerName, seen); |
| 4081 | if (inherited) return inherited; |
| 4082 | } |
| 4083 | return undefined; |
| 4084 | } |
| 4085 | |
| 4086 | /** |
| 4087 | * The file a CFML include names (#2651) — `include "x.cfm";`, |
no test coverage detected