Skip to content

Commit fe6deff

Browse files
authored
Merge pull request #33 from IBM/main
Add service point
2 parents 4424d28 + 35e3a22 commit fe6deff

1 file changed

Lines changed: 29 additions & 33 deletions

File tree

cldk/analysis/java/java.py

Lines changed: 29 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,10 @@ def get_variables(self, **kwargs):
8888
raise NotImplementedError(f"Support for this functionality has not been implemented yet.")
8989

9090
def get_service_entry_point_classes(self, **kwargs):
91-
if self.analysis_backend in [AnalysisEngine.CODEQL, AnalysisEngine.TREESITTER]:
92-
raise NotImplementedError(f"Support for this functionality has not been implemented yet.")
93-
return self.backend.get_all_entry_point_classes()
91+
raise NotImplementedError(f"Support for this functionality has not been implemented yet.")
9492

9593
def get_service_entry_point_methods(self, **kwargs):
96-
if self.analysis_backend in [AnalysisEngine.CODEQL, AnalysisEngine.TREESITTER]:
97-
raise NotImplementedError(f"Support for this functionality has not been implemented yet.")
98-
return self.backend.get_all_entry_point_methods()
94+
raise NotImplementedError(f"Support for this functionality has not been implemented yet.")
9995

10096
def get_application_view(self) -> JApplication:
10197
"""
@@ -494,33 +490,33 @@ def get_class_call_graph(self, qualified_class_name: str, method_signature: str
494490
raise NotImplementedError(f"Support for this functionality has not been implemented yet.")
495491
return self.backend.get_class_call_graph(qualified_class_name, method_signature)
496492

497-
# def get_entry_point_classes(self) -> Dict[str, JType]:
498-
# """
499-
# Returns a dictionary of all entry point classes in the Java code.
500-
#
501-
# Returns:
502-
# --------
503-
# Dict[str, JType]
504-
# A dict of all entry point classes in the Java code, with qualified class names as keys
505-
# """
506-
# if self.analysis_backend in [AnalysisEngine.CODEQL, AnalysisEngine.TREESITTER]:
507-
# raise NotImplementedError(f"Support for this functionality has not been implemented yet.")
508-
# return self.backend.get_all_entry_point_classes()
509-
#
510-
# def get_entry_point_methods(self) -> Dict[str, Dict[str, JCallable]]:
511-
# """
512-
# Returns a dictionary of all entry point methods in the Java code with
513-
# qualified class name as key and dictionary of methods in that class
514-
# as value
515-
#
516-
# Returns:
517-
# --------
518-
# Dict[str, Dict[str, JCallable]]:
519-
# A dictionary of dictionaries of entry point methods in the Java code.
520-
# """
521-
# if self.analysis_backend in [AnalysisEngine.CODEQL, AnalysisEngine.TREESITTER]:
522-
# raise NotImplementedError(f"Support for this functionality has not been implemented yet.")
523-
# return self.backend.get_all_entry_point_methods()
493+
def get_entry_point_classes(self) -> Dict[str, JType]:
494+
"""
495+
Returns a dictionary of all entry point classes in the Java code.
496+
497+
Returns:
498+
--------
499+
Dict[str, JType]
500+
A dict of all entry point classes in the Java code, with qualified class names as keys
501+
"""
502+
if self.analysis_backend in [AnalysisEngine.CODEQL, AnalysisEngine.TREESITTER]:
503+
raise NotImplementedError(f"Support for this functionality has not been implemented yet.")
504+
return self.backend.get_all_entry_point_classes()
505+
506+
def get_entry_point_methods(self) -> Dict[str, Dict[str, JCallable]]:
507+
"""
508+
Returns a dictionary of all entry point methods in the Java code with
509+
qualified class name as key and dictionary of methods in that class
510+
as value
511+
512+
Returns:
513+
--------
514+
Dict[str, Dict[str, JCallable]]:
515+
A dictionary of dictionaries of entry point methods in the Java code.
516+
"""
517+
if self.analysis_backend in [AnalysisEngine.CODEQL, AnalysisEngine.TREESITTER]:
518+
raise NotImplementedError(f"Support for this functionality has not been implemented yet.")
519+
return self.backend.get_all_entry_point_methods()
524520

525521
def remove_all_comments(self) -> str:
526522
"""

0 commit comments

Comments
 (0)