use of jadx.api.data.ICodeData in project jadx by skylot.
the class RootNode method notifyCodeDataListeners.
public void notifyCodeDataListeners() {
ICodeData codeData = args.getCodeData();
codeDataUpdateListeners.forEach(l -> l.updated(codeData));
}
use of jadx.api.data.ICodeData in project jadx by skylot.
the class UserRenames method applyForNodes.
public static void applyForNodes(RootNode root) {
ICodeData codeData = root.getArgs().getCodeData();
if (codeData == null || codeData.getRenames().isEmpty()) {
return;
}
InfoStorage infoStorage = root.getInfoStorage();
codeData.getRenames().stream().filter(r -> r.getCodeRef() == null && r.getNodeRef().getType() != IJavaNodeRef.RefType.PKG).collect(Collectors.groupingBy(r -> r.getNodeRef().getDeclaringClass())).forEach((clsRawName, renames) -> {
ClassInfo clsInfo = infoStorage.getCls(ArgType.object(clsRawName));
if (clsInfo != null) {
ClassNode cls = root.resolveClass(clsInfo);
if (cls != null) {
for (ICodeRename rename : renames) {
applyRename(cls, rename);
}
return;
}
}
LOG.warn("Class info with reference '{}' not found", clsRawName);
});
applyPkgRenames(root, codeData.getRenames());
}
Aggregations