本文整理汇总了Java中com.android.dex.FieldId类的典型用法代码示例。如果您正苦于以下问题:Java FieldId类的具体用法?Java FieldId怎么用?Java FieldId使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FieldId类属于com.android.dex包,在下文中一共展示了FieldId类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: adjust
import com.android.dex.FieldId; //导入依赖的package包/类
public FieldId adjust(FieldId fieldId) {
return new FieldId(target,
adjustType(fieldId.getDeclaringClassIndex()),
adjustType(fieldId.getTypeIndex()),
adjustString(fieldId.getNameIndex()));
}
示例2: getFieldIds
import com.android.dex.FieldId; //导入依赖的package包/类
/**
* Returns the fields with {@code memberNameIndex} declared by {@code
* declaringType}.
*/
private Set<Integer> getFieldIds(Dex dex, Set<Integer> memberNameIndexes, int declaringType) {
Set<Integer> fields = new HashSet<Integer>();
int fieldIndex = 0;
for (FieldId fieldId : dex.fieldIds()) {
if (memberNameIndexes.contains(fieldId.getNameIndex())
&& declaringType == fieldId.getDeclaringClassIndex()) {
fields.add(fieldIndex);
}
fieldIndex++;
}
return fields;
}
示例3: printFieldIds
import com.android.dex.FieldId; //导入依赖的package包/类
private void printFieldIds() throws IOException {
int index = 0;
for (FieldId fieldId : dex.fieldIds()) {
System.out.println("field " + index + ": " + fieldId);
index++;
}
}
示例4: fromDex
import com.android.dex.FieldId; //导入依赖的package包/类
public static FieldInfo fromDex(DexNode dex, int index) {
FieldId field = dex.getFieldId(index);
return from(dex,
ClassInfo.fromDex(dex, field.getDeclaringClassIndex()),
dex.getString(field.getNameIndex()),
dex.getType(field.getTypeIndex()));
}
示例5: fromDex
import com.android.dex.FieldId; //导入依赖的package包/类
static FieldDescriptor fromDex(Dex dex, int fieldIndex) {
FieldId field = dex.fieldIds().get(fieldIndex);
String name = dex.strings().get(field.getNameIndex());
String declaringClass = typeName(dex, field.getDeclaringClassIndex());
String type = typeName(dex, field.getTypeIndex());
return new AutoValue_DexLimitTracker_FieldDescriptor(declaringClass, name, type);
}
示例6: getFieldId
import com.android.dex.FieldId; //导入依赖的package包/类
public FieldId getFieldId(int fieldIndex) {
return dexBuf.fieldIds().get(fieldIndex);
}