MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / _java_annotation_nodes

Function _java_annotation_nodes

graphify/extractors/engine.py:1081–1094  ·  view source on GitHub ↗

Return annotations from a Java declaration's `modifiers` child.

(declaration_node)

Source from the content-addressed store, hash-verified

1079
1080
1081def _java_annotation_nodes(declaration_node) -> list:
1082 """Return annotations from a Java declaration's `modifiers` child."""
1083 modifiers = None
1084 for child in declaration_node.children:
1085 if child.type == "modifiers":
1086 modifiers = child
1087 break
1088 if modifiers is None:
1089 return []
1090 return [
1091 child
1092 for child in modifiers.children
1093 if child.type in ("marker_annotation", "annotation")
1094 ]
1095
1096
1097def _java_annotation_names(declaration_node, source: bytes) -> list[tuple[str, str]]:

Callers 4

_java_annotation_namesFunction · 0.85
_java_lombok_gettersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected