MCPcopy Index your code
hub / github.com/tirth8205/code-review-graph / _get_java_annotations

Method _get_java_annotations

code_review_graph/parser.py:3863–3875  ·  view source on GitHub ↗

Return annotation names from the modifiers child of a Java class/method node.

(class_node)

Source from the content-addressed store, hash-verified

3861
3862 @staticmethod
3863 def _get_java_annotations(class_node) -> list[str]:
3864 """Return annotation names from the modifiers child of a Java class/method node."""
3865 names: list[str] = []
3866 for child in class_node.children:
3867 if child.type != "modifiers":
3868 continue
3869 for mod in child.children:
3870 if mod.type in ("marker_annotation", "annotation"):
3871 for sub in mod.children:
3872 if sub.type == "identifier":
3873 names.append(sub.text.decode("utf-8", errors="replace"))
3874 break
3875 return names
3876
3877 def _emit_spring_injections(
3878 self,

Callers 2

_extract_classesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected