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

Method visit_for_calls_and_structure

codegraph-kernel/src/java.rs:542–578  ·  view source on GitHub ↗
(&mut self, node: Node<'t>)

Source from the content-addressed store, hash-verified

540 }
541
542 fn visit_for_calls_and_structure(&mut self, node: Node<'t>) {
543 stack_guard!();
544 let kind = node.kind();
545 self.maybe_capture_fn_refs(node);
546
547 if kind == "method_invocation" {
548 self.extract_call(node);
549 } else if kind == "object_creation_expression" {
550 self.extract_instantiation(node);
551 if let Some(anon_body) = find_anonymous_class_body(node) {
552 self.extract_anonymous_class(node, anon_body);
553 return;
554 }
555 }
556
557 // Static-member / value-read (`Type.CONST`) — self-gates on field_access.
558 self.extract_static_member_ref(node);
559
560 if kind == "class_declaration" {
561 self.extract_class(node);
562 return;
563 }
564 if kind == "enum_declaration" {
565 self.extract_enum(node);
566 return;
567 }
568 if is_interface_type(kind) {
569 self.extract_interface(node);
570 return;
571 }
572
573 for i in 0..node.named_child_count() {
574 if let Some(c) = node.named_child(i) {
575 self.visit_for_calls_and_structure(c);
576 }
577 }
578 }
579
580 // --- extractors --------------------------------------------------------------
581

Callers 1

visit_function_bodyMethod · 0.45

Calls 10

is_interface_typeFunction · 0.85
maybe_capture_fn_refsMethod · 0.45
extract_callMethod · 0.45
extract_instantiationMethod · 0.45
extract_classMethod · 0.45
extract_enumMethod · 0.45
extract_interfaceMethod · 0.45

Tested by

no test coverage detected