Skip to content

revert uncomment code #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 29 additions & 33 deletions cldk/analysis/java/java.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
"""
Expand Down Expand Up @@ -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:
"""
Expand Down