Resolve Java import to file path
(self, import_path: str)
| 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 | |
| 798 | class ImportParserFactory: |
no outgoing calls
no test coverage detected