use of jadx.core.dex.info.ConstStorage in project jadx by skylot.
the class AndroidResourcesUtils method fillResFieldsMap.
@NotNull
private static Map<Integer, FieldNode> fillResFieldsMap(ClassNode resCls) {
Map<Integer, FieldNode> resFieldsMap = new HashMap<>();
ConstStorage constStorage = resCls.root().getConstValues();
Map<Object, FieldNode> constFields = constStorage.getGlobalConstFields();
for (Map.Entry<Object, FieldNode> entry : constFields.entrySet()) {
Object key = entry.getKey();
FieldNode field = entry.getValue();
AccessInfo accessFlags = field.getAccessFlags();
if (field.getType().equals(ArgType.INT) && accessFlags.isStatic() && accessFlags.isFinal() && key instanceof Integer) {
resFieldsMap.put((Integer) key, field);
}
}
return resFieldsMap;
}
Aggregations