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:547–581  ·  view source on GitHub ↗
(&mut self, node: Node<'t>)

Source from the content-addressed store, hash-verified

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

Callers 1

visit_function_bodyMethod · 0.45

Calls 12

is_interface_typeFunction · 0.85
is_class_typeFunction · 0.70
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
walkMethod · 0.45

Tested by

no test coverage detected