本文整理汇总了Java中org.jf.dexlib2.dexbacked.raw.TypeIdItem类的典型用法代码示例。如果您正苦于以下问题:Java TypeIdItem类的具体用法?Java TypeIdItem怎么用?Java TypeIdItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TypeIdItem类属于org.jf.dexlib2.dexbacked.raw包,在下文中一共展示了TypeIdItem类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTypeIdItemOffset
import org.jf.dexlib2.dexbacked.raw.TypeIdItem; //导入依赖的package包/类
public int getTypeIdItemOffset(int typeIndex) {
if(this.type == DexFileDataType.MEMORYTYPE){
return typeStartOffset + typeIndex*TypeIdItem.ITEM_SIZE;
}
if (typeIndex < 0 || typeIndex >= typeCount) {
throw new InvalidItemIndex(typeIndex, "Type index out of bounds: %d", typeIndex);
}
return typeStartOffset + typeIndex*TypeIdItem.ITEM_SIZE;
}
示例2: getDataSectionOffset
import org.jf.dexlib2.dexbacked.raw.TypeIdItem; //导入依赖的package包/类
private int getDataSectionOffset() {
return HeaderItem.ITEM_SIZE +
stringSection.getItems().size() * StringIdItem.ITEM_SIZE +
typeSection.getItems().size() * TypeIdItem.ITEM_SIZE +
protoSection.getItems().size() * ProtoIdItem.ITEM_SIZE +
fieldSection.getItems().size() * FieldIdItem.ITEM_SIZE +
methodSection.getItems().size() * MethodIdItem.ITEM_SIZE +
classSection.getItems().size() * ClassDefItem.ITEM_SIZE;
}
示例3: getTypeIdItemOffset
import org.jf.dexlib2.dexbacked.raw.TypeIdItem; //导入依赖的package包/类
public int getTypeIdItemOffset(int typeIndex) {
if (typeIndex < 0 || typeIndex >= typeCount) {
throw new InvalidItemIndex(typeIndex, "Type index out of bounds: %d", typeIndex);
}
return typeStartOffset + typeIndex*TypeIdItem.ITEM_SIZE;
}
示例4: getTypeIdItemOffset
import org.jf.dexlib2.dexbacked.raw.TypeIdItem; //导入依赖的package包/类
public int getTypeIdItemOffset(int typeIndex) {
if (typeIndex < 0 || typeIndex >= typeCount) {
throw new InvalidItemIndex(typeIndex, "Type index out of bounds: %d", typeIndex);
}
return typeStartOffset + typeIndex * TypeIdItem.ITEM_SIZE;
}
示例5: DexAnnotator
import org.jf.dexlib2.dexbacked.raw.TypeIdItem; //导入依赖的package包/类
public DexAnnotator(@Nonnull RawDexFile dexFile, int width) {
super(width);
this.dexFile = dexFile;
for (MapItem mapItem : dexFile.getMapItems()) {
switch (mapItem.getType()) {
case ItemType.HEADER_ITEM:
annotators.put(mapItem.getType(), HeaderItem.makeAnnotator(this, mapItem));
break;
case ItemType.STRING_ID_ITEM:
annotators.put(mapItem.getType(), StringIdItem.makeAnnotator(this, mapItem));
break;
case ItemType.TYPE_ID_ITEM:
annotators.put(mapItem.getType(), TypeIdItem.makeAnnotator(this, mapItem));
break;
case ItemType.PROTO_ID_ITEM:
annotators.put(mapItem.getType(), ProtoIdItem.makeAnnotator(this, mapItem));
break;
case ItemType.FIELD_ID_ITEM:
annotators.put(mapItem.getType(), FieldIdItem.makeAnnotator(this, mapItem));
break;
case ItemType.METHOD_ID_ITEM:
annotators.put(mapItem.getType(), MethodIdItem.makeAnnotator(this, mapItem));
break;
case ItemType.CLASS_DEF_ITEM:
annotators.put(mapItem.getType(), ClassDefItem.makeAnnotator(this, mapItem));
break;
case ItemType.MAP_LIST:
annotators.put(mapItem.getType(), MapItem.makeAnnotator(this, mapItem));
break;
case ItemType.TYPE_LIST:
annotators.put(mapItem.getType(), TypeListItem.makeAnnotator(this, mapItem));
break;
case ItemType.ANNOTATION_SET_REF_LIST:
annotators.put(mapItem.getType(), AnnotationSetRefList.makeAnnotator(this, mapItem));
break;
case ItemType.ANNOTATION_SET_ITEM:
annotators.put(mapItem.getType(), AnnotationSetItem.makeAnnotator(this, mapItem));
break;
case ItemType.CLASS_DATA_ITEM:
annotators.put(mapItem.getType(), ClassDataItem.makeAnnotator(this, mapItem));
break;
case ItemType.CODE_ITEM:
annotators.put(mapItem.getType(), CodeItem.makeAnnotator(this, mapItem));
break;
case ItemType.STRING_DATA_ITEM:
annotators.put(mapItem.getType(), StringDataItem.makeAnnotator(this, mapItem));
break;
case ItemType.DEBUG_INFO_ITEM:
annotators.put(mapItem.getType(), DebugInfoItem.makeAnnotator(this, mapItem));
break;
case ItemType.ANNOTATION_ITEM:
annotators.put(mapItem.getType(), AnnotationItem.makeAnnotator(this, mapItem));
break;
case ItemType.ENCODED_ARRAY_ITEM:
annotators.put(mapItem.getType(), EncodedArrayItem.makeAnnotator(this, mapItem));
break;
case ItemType.ANNOTATION_DIRECTORY_ITEM:
annotators.put(mapItem.getType(), AnnotationDirectoryItem.makeAnnotator(this, mapItem));
break;
default:
throw new RuntimeException(String.format("Unrecognized item type: 0x%x", mapItem.getType()));
}
}
}