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

Function extract_groovy

graphify/extract.py:6451–6460  ·  view source on GitHub ↗

Extract classes, methods, constructors, and imports from a .groovy/.gradle file. Falls back to a regex-based Spock extractor when tree-sitter-groovy cannot parse ``def "feature name"()`` methods (common in Spock specification classes).

(path: Path)

Source from the content-addressed store, hash-verified

6449
6450
6451def extract_groovy(path: Path) -> dict:
6452 """Extract classes, methods, constructors, and imports from a .groovy/.gradle file.
6453
6454 Falls back to a regex-based Spock extractor when tree-sitter-groovy cannot parse
6455 ``def "feature name"()`` methods (common in Spock specification classes).
6456 """
6457 result = _extract_generic(path, _GROOVY_CONFIG)
6458 if _is_spock_file(path, result):
6459 result = _extract_spock_fallback(path, result)
6460 return result
6461
6462
6463def extract_c(path: Path) -> dict:

Calls 3

_extract_genericFunction · 0.85
_is_spock_fileFunction · 0.85
_extract_spock_fallbackFunction · 0.85