use of com.synopsys.integration.detectable.detectables.conda.model.CondaInfo in project synopsys-detect by blackducksoftware.
the class CondaListParser method parse.
public DependencyGraph parse(String listJsonText, String infoJsonText) {
Type listType = new TypeToken<ArrayList<CondaListElement>>() {
}.getType();
List<CondaListElement> condaList = gson.fromJson(listJsonText, listType);
CondaInfo condaInfo = gson.fromJson(infoJsonText, CondaInfo.class);
String platform = condaInfo.platform;
DependencyGraph graph = new BasicDependencyGraph();
condaList.stream().map(condaListElement -> dependencyCreator.createFromCondaListElement(condaListElement, platform)).forEach(graph::addChildToRoot);
return graph;
}
Also used :
List(java.util.List)
DependencyGraph(com.synopsys.integration.bdio.graph.DependencyGraph)
TypeToken(com.google.gson.reflect.TypeToken)
Type(java.lang.reflect.Type)
Gson(com.google.gson.Gson)
CondaListElement(com.synopsys.integration.detectable.detectables.conda.model.CondaListElement)
BasicDependencyGraph(com.synopsys.integration.bdio.graph.BasicDependencyGraph)
ArrayList(java.util.ArrayList)
CondaInfo(com.synopsys.integration.detectable.detectables.conda.model.CondaInfo)
Type(java.lang.reflect.Type)
ArrayList(java.util.ArrayList)
CondaInfo(com.synopsys.integration.detectable.detectables.conda.model.CondaInfo)
DependencyGraph(com.synopsys.integration.bdio.graph.DependencyGraph)
BasicDependencyGraph(com.synopsys.integration.bdio.graph.BasicDependencyGraph)
BasicDependencyGraph(com.synopsys.integration.bdio.graph.BasicDependencyGraph)
CondaListElement(com.synopsys.integration.detectable.detectables.conda.model.CondaListElement)