@@ -48,40 +48,6 @@ class JCodeanalyzer:
4848 If None, the analysis will be read from the pipe.
4949 analysis_level (str): The level of analysis ('symbol_table' or 'call_graph').
5050 eager_analysis (bool): If True, the analysis will be performed every time the object is created.
51-
52- Methods:
53- _init_codeanalyzer(analysis_level=1):
54- Initializes the codeanalyzer database.
55-
56- _download_or_update_code_analyzer(filepath: Path) -> str:
57- Downloads the codeanalyzer jar from the latest release on GitHub.
58-
59- _get_application() -> JApplication:
60- Returns the application view of the Java code.
61-
62- _get_codeanalyzer_exec() -> List[str]:
63- Returns the executable command for codeanalyzer.
64-
65- _codeanalyzer_single_file() -> JApplication:
66- Invokes codeanalyzer in a single file mode.
67-
68- get_symbol_table() -> Dict[str, JCompilationUnit]:
69- Returns the symbol table of the Java code.
70-
71- get_application_view() -> JApplication:
72- Returns the application view of the Java code.
73-
74- get_system_dependency_graph() -> list[JGraphEdges]:
75- Runs the codeanalyzer to get the system dependency graph.
76-
77- _generate_call_graph(using_symbol_table: bool) -> nx.DiGraph:
78- Generates the call graph of the Java code.
79-
80- get_class_hierarchy() -> nx.DiGraph:
81- Returns the class hierarchy of the Java code.
82-
83- get_call_graph() -> nx.DiGraph:
84- Returns the call graph of the Java code.
8551 """
8652
8753 def __init__ (
@@ -276,10 +242,11 @@ def get_system_dependency_graph(self) -> list[JGraphEdges]:
276242 Returns:
277243 list[JGraphEdges]: The system dependency graph.
278244 """
279- if self .application .system_dependency_graph is None :
245+ if self .application .system_dependency_graph is None or self . application . call_graph is None :
280246 self .application = self ._init_codeanalyzer (analysis_level = 2 )
281247
282- return self .application .system_dependency_graph
248+ logger .warning ("System dependency graph is not yet implemented. Returning the call graph instead." )
249+ return self .application .call_graph
283250
284251 def _generate_call_graph (self , using_symbol_table ) -> nx .DiGraph :
285252 """Generates the call graph of the Java code.
0 commit comments