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

Method is_const

codegraph-kernel/src/java.rs:442–453  ·  view source on GitHub ↗

javaExtractor.isConst: `static final` field → constant.

(&self, node: Node)

Source from the content-addressed store, hash-verified

440
441 /// javaExtractor.isConst: `static final` field → constant.
442 fn is_const(&self, node: Node) -> bool {
443 if node.kind() == "constant_declaration" {
444 return true;
445 }
446 for child in node.children(&mut node.walk()) {
447 if child.kind() == "modifiers" {
448 let text = self.text(child);
449 return word_re("static").is_match(text) && word_re("final").is_match(text);
450 }
451 }
452 false
453 }
454
455 fn signature_of(&self, node: Node) -> Option<String> {
456 let params = node.child_by_field_name("parameters")?;

Callers 2

extract_fieldMethod · 0.45
extract_variableMethod · 0.45

Calls 4

word_reFunction · 0.85
childrenMethod · 0.80
textMethod · 0.65
walkMethod · 0.45

Tested by

no test coverage detected