MCPcopy Create free account
hub / github.com/modelscope/ms-agent / _resolve_java_path

Method _resolve_java_path

ms_agent/utils/parser_utils.py:782–795  ·  view source on GitHub ↗

Resolve Java import to file path

(self, import_path: str)

Source from the content-addressed store, hash-verified

780 import_type=import_type)
781
782 def _resolve_java_path(self, import_path: str) -> Optional[str]:
783 """Resolve Java import to file path"""
784 # Remove .* if present
785 if import_path.endswith('.*'):
786 import_path = import_path[:-2]
787
788 # Convert package.Class to path/Class.java
789 file_path = import_path.replace('.', os.sep) + '.java'
790 full_path = os.path.join(self.output_dir, file_path)
791
792 if os.path.exists(full_path):
793 return file_path
794
795 return None
796
797
798class ImportParserFactory:

Callers 1

_extract_java_importMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected