@@ -48,40 +48,6 @@ class JCodeanalyzer:
48
48
If None, the analysis will be read from the pipe.
49
49
analysis_level (str): The level of analysis ('symbol_table' or 'call_graph').
50
50
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.
85
51
"""
86
52
87
53
def __init__ (
@@ -276,10 +242,11 @@ def get_system_dependency_graph(self) -> list[JGraphEdges]:
276
242
Returns:
277
243
list[JGraphEdges]: The system dependency graph.
278
244
"""
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 :
280
246
self .application = self ._init_codeanalyzer (analysis_level = 2 )
281
247
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
283
250
284
251
def _generate_call_graph (self , using_symbol_table ) -> nx .DiGraph :
285
252
"""Generates the call graph of the Java code.
0 commit comments