Skip to content

Commit 2287ec6

Browse files
Rangeet PanRangeet Pan
authored andcommitted
add call for entry point detection code
1 parent 913e9f1 commit 2287ec6

2 files changed

Lines changed: 29 additions & 127 deletions

File tree

cldk/analysis/java/java.py

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@ def get_variables(self, **kwargs):
8585
def get_service_entry_point_classes(self, **kwargs):
8686
if self.analysis_backend in [AnalysisEngine.CODEQL, AnalysisEngine.TREESITTER]:
8787
raise NotImplementedError(f"Support for this functionality has not been implemented yet.")
88-
return self.get_entry_point_classes()
88+
return self.backend.get_all_entry_point_classes()
8989

9090
def get_service_entry_point_methods(self, **kwargs):
9191
if self.analysis_backend in [AnalysisEngine.CODEQL, AnalysisEngine.TREESITTER]:
9292
raise NotImplementedError(f"Support for this functionality has not been implemented yet.")
93-
return self.get_service_entry_point_methods()
93+
return self.backend.get_all_entry_point_methods()
9494

9595
def get_application_view(self) -> JApplication:
9696
"""
@@ -487,33 +487,33 @@ def get_class_call_graph(self, qualified_class_name: str, method_signature: str
487487
raise NotImplementedError(f"Support for this functionality has not been implemented yet.")
488488
return self.backend.get_class_call_graph(qualified_class_name, method_signature)
489489

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

518518
def remove_all_comments(self) -> str:
519519
"""

tests/example.py

Lines changed: 0 additions & 98 deletions
This file was deleted.

0 commit comments

Comments
 (0)