diff --git a/cldk/analysis/java/codeanalyzer/codeanalyzer.py b/cldk/analysis/java/codeanalyzer/codeanalyzer.py index 7dccd9ba..fbe56f0f 100644 --- a/cldk/analysis/java/codeanalyzer/codeanalyzer.py +++ b/cldk/analysis/java/codeanalyzer/codeanalyzer.py @@ -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 @@ -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 \ No newline at end of file + return class_dict