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

Function find_anonymous_class_body

codegraph-kernel/src/java.rs:1667–1674  ·  view source on GitHub ↗
(node: Node)

Source from the content-addressed store, hash-verified

1665}
1666
1667fn find_anonymous_class_body(node: Node) -> Option<Node> {
1668 for child in node.named_children(&mut node.walk()) {
1669 if matches!(child.kind(), "class_body" | "declaration_list") {
1670 return Some(child);
1671 }
1672 }
1673 None
1674}
1675
1676/// The `new ns.Foo<T>()` name normalization shared by instantiation /
1677/// anonymous-class / decorator extraction: strip `<...` from the first `<`

Callers 2

visit_nodeMethod · 0.70

Calls 1

walkMethod · 0.45

Tested by

no test coverage detected