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

Method visibility_of

codegraph-kernel/src/java.rs:405–422  ·  view source on GitHub ↗
(&self, node: Node)

Source from the content-addressed store, hash-verified

403 }
404
405 fn visibility_of(&self, node: Node) -> Option<u8> {
406 for i in 0..node.child_count() {
407 let child = node.child(i)?;
408 if child.kind() == "modifiers" {
409 let text = self.text(child);
410 if text.contains("public") {
411 return Some(1);
412 }
413 if text.contains("private") {
414 return Some(2);
415 }
416 if text.contains("protected") {
417 return Some(3);
418 }
419 }
420 }
421 None
422 }
423
424 fn is_static(&self, node: Node) -> bool {
425 for i in 0..node.child_count() {

Callers 5

extract_classMethod · 0.45
extract_methodMethod · 0.45
extract_functionMethod · 0.45
extract_enumMethod · 0.45
extract_fieldMethod · 0.45

Calls 1

textMethod · 0.45

Tested by

no test coverage detected