Skip to content
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
13 changes: 11 additions & 2 deletions cldk/analysis/java/codeanalyzer/codeanalyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,16 @@ def _get_codeanalyzer_exec(self) -> List[str]:
codeanalyzer_jar_file = self._download_or_update_code_analyzer(codeanalyzer_jar_path)
codeanalyzer_exec = shlex.split(f"java -jar {codeanalyzer_jar_file}")
return codeanalyzer_exec


def init_japplication(self, data: str) -> JApplication:
"""Return JApplication giving the stringified JSON as input.
Returns
-------
JApplication
The application view of the Java code with the analysis results.
"""
return JApplication(**json.loads(data))

def _init_codeanalyzer(self, analysis_level=1) -> JApplication:
"""Initializes the Codeanalyzer.
Returns
Expand Down Expand Up @@ -1043,4 +1052,4 @@ def get_all_entry_point_classes(self) -> Dict[str, JType]:
symtab = self.get_symbol_table()
for val in symtab.values():
class_dict.update((k, v) for k, v in val.type_declarations.items() if v.is_entry_point is True)
return class_dict
return class_dict