use of jadx.api.ResourceFileContent in project jadx by skylot.
the class JResource method addSubFiles.
protected void addSubFiles(ResContainer rc, JResource root, int depth) {
CodeWriter cw = rc.getContent();
if (cw != null) {
if (depth == 0) {
root.lineMapping = cw.getLineMapping();
root.content = cw.toString();
} else {
String name = rc.getName();
String[] path = name.split("/");
String shortName = path.length == 0 ? name : path[path.length - 1];
ResourceFileContent fileContent = new ResourceFileContent(shortName, ResourceType.XML, cw);
addPath(path, root, new JResource(fileContent, name, shortName, JResType.FILE));
}
}
List<ResContainer> subFiles = rc.getSubFiles();
if (!subFiles.isEmpty()) {
for (ResContainer subFile : subFiles) {
addSubFiles(subFile, root, depth + 1);
}
}
}
Aggregations