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

Source from the content-addressed store, hash-verified

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

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