diff --git a/cldk/analysis/java/java.py b/cldk/analysis/java/java.py index 419c2ad..0b02684 100644 --- a/cldk/analysis/java/java.py +++ b/cldk/analysis/java/java.py @@ -83,14 +83,10 @@ def get_variables(self, **kwargs): raise NotImplementedError(f"Support for this functionality has not been implemented yet.") def get_service_entry_point_classes(self, **kwargs): - if self.analysis_backend in [AnalysisEngine.CODEQL, AnalysisEngine.TREESITTER]: - raise NotImplementedError(f"Support for this functionality has not been implemented yet.") - return self.backend.get_all_entry_point_classes() + raise NotImplementedError(f"Support for this functionality has not been implemented yet.") def get_service_entry_point_methods(self, **kwargs): - if self.analysis_backend in [AnalysisEngine.CODEQL, AnalysisEngine.TREESITTER]: - raise NotImplementedError(f"Support for this functionality has not been implemented yet.") - return self.backend.get_all_entry_point_methods() + raise NotImplementedError(f"Support for this functionality has not been implemented yet.") def get_application_view(self) -> JApplication: """ @@ -487,33 +483,33 @@ def get_class_call_graph(self, qualified_class_name: str, method_signature: str raise NotImplementedError(f"Support for this functionality has not been implemented yet.") return self.backend.get_class_call_graph(qualified_class_name, method_signature) - # def get_entry_point_classes(self) -> Dict[str, JType]: - # """ - # Returns a dictionary of all entry point classes in the Java code. - # - # Returns: - # -------- - # Dict[str, JType] - # A dict of all entry point classes in the Java code, with qualified class names as keys - # """ - # if self.analysis_backend in [AnalysisEngine.CODEQL, AnalysisEngine.TREESITTER]: - # raise NotImplementedError(f"Support for this functionality has not been implemented yet.") - # return self.backend.get_all_entry_point_classes() - # - # def get_entry_point_methods(self) -> Dict[str, Dict[str, JCallable]]: - # """ - # Returns a dictionary of all entry point methods in the Java code with - # qualified class name as key and dictionary of methods in that class - # as value - # - # Returns: - # -------- - # Dict[str, Dict[str, JCallable]]: - # A dictionary of dictionaries of entry point methods in the Java code. - # """ - # if self.analysis_backend in [AnalysisEngine.CODEQL, AnalysisEngine.TREESITTER]: - # raise NotImplementedError(f"Support for this functionality has not been implemented yet.") - # return self.backend.get_all_entry_point_methods() + def get_entry_point_classes(self) -> Dict[str, JType]: + """ + Returns a dictionary of all entry point classes in the Java code. + + Returns: + -------- + Dict[str, JType] + A dict of all entry point classes in the Java code, with qualified class names as keys + """ + if self.analysis_backend in [AnalysisEngine.CODEQL, AnalysisEngine.TREESITTER]: + raise NotImplementedError(f"Support for this functionality has not been implemented yet.") + return self.backend.get_all_entry_point_classes() + + def get_entry_point_methods(self) -> Dict[str, Dict[str, JCallable]]: + """ + Returns a dictionary of all entry point methods in the Java code with + qualified class name as key and dictionary of methods in that class + as value + + Returns: + -------- + Dict[str, Dict[str, JCallable]]: + A dictionary of dictionaries of entry point methods in the Java code. + """ + if self.analysis_backend in [AnalysisEngine.CODEQL, AnalysisEngine.TREESITTER]: + raise NotImplementedError(f"Support for this functionality has not been implemented yet.") + return self.backend.get_all_entry_point_methods() def remove_all_comments(self) -> str: """