override fun visitClass()

in src/main/kotlin/com/netflix/dgs/plugin/hints/DgsComponentInspector.kt [40:64]


            override fun visitClass(node: UClass): Boolean {
                val dgsService = node.project.getService(DgsService::class.java)
                if(!dgsService.isDgsProject(node.project)) {
                    return false
                }

                val hasDgsComponentAnnotation: Boolean =
                    node.javaPsi.hasAnnotation("com.netflix.graphql.dgs.DgsComponent")
                if (Arrays.stream(node.methods)
                        .anyMatch { m ->
                            DgsConstants.dgsAnnotations.stream().anyMatch { annotation -> m.javaPsi.hasAnnotation(annotation) }
                        } && !hasDgsComponentAnnotation
                ) {
                    node.identifyingElement?.let {
                        holder.registerProblem(
                            it,
                            MyBundle.getMessage("dgs.inspection.missing.component.annotation"),
                            ProblemHighlightType.WARNING,
                            DgsComponentQuickfix
                        )
                    }
                    return true
                }
                return false
            }