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

Method extract_class

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

Source from the content-addressed store, hash-verified

580 // --- extractors --------------------------------------------------------------
581
582 fn extract_class(&mut self, node: Node<'t>) {
583 stack_guard!();
584 let name = self.extract_name(node);
585 let extra = Extra {
586 docstring: preceding_docstring(node, self.src),
587 visibility: self.visibility_of(node),
588 ..Extra::default() // java has no isExported hook
589 };
590 let Some(row) = self.create_node("class", &name, node, extra) else { return };
591 self.extract_inheritance(node, row);
592 self.extract_decorators_for(node, row);
593
594 self.stack.push(Scope { row, kind: "class", name });
595 let body = node.child_by_field_name("body").unwrap_or(node);
596 for i in 0..body.named_child_count() {
597 if let Some(c) = body.named_child(i) {
598 self.visit_node(c);
599 }
600 }
601 // Lombok member synthesis (#912) — class still on the stack.
602 self.synthesize_lombok_members(node, row);
603 self.stack.pop();
604 }
605
606 fn extract_method(&mut self, node: Node<'t>) {
607 stack_guard!();

Callers 2

visit_nodeMethod · 0.45

Calls 8

preceding_docstringFunction · 0.85
extract_nameMethod · 0.45
visibility_ofMethod · 0.45
create_nodeMethod · 0.45
extract_inheritanceMethod · 0.45
visit_nodeMethod · 0.45

Tested by

no test coverage detected