use of com.android.dx.dex.file.FieldIdItem in project buck by facebook.
the class Main method computeReferencedResources.
private void computeReferencedResources() {
for (Item genericItem : outputDex.getFieldIds().items()) {
FieldIdItem item = (FieldIdItem) genericItem;
CstType fieldClass = item.getDefiningClass();
CstString fieldName = item.getRef().getNat().getName();
if (fieldClass.getClassType().getDescriptor().contains("/R$")) {
// Add the packageName of the class for better accuracy.
resourceNames.add(fieldClass.getPackageName() + "." + fieldName.getString());
}
}
}
Aggregations