本文整理汇总了Java中org.jf.dexlib2.dexbacked.raw.StringIdItem类的典型用法代码示例。如果您正苦于以下问题:Java StringIdItem类的具体用法?Java StringIdItem怎么用?Java StringIdItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
StringIdItem类属于org.jf.dexlib2.dexbacked.raw包,在下文中一共展示了StringIdItem类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getStringIdItemOffset
import org.jf.dexlib2.dexbacked.raw.StringIdItem; //导入依赖的package包/类
public int getStringIdItemOffset(int stringIndex) {
if(this.type == DexFileDataType.MEMORYTYPE){
return stringStartOffset + stringIndex*StringIdItem.ITEM_SIZE;
}
if (stringIndex < 0 || stringIndex >= stringCount) {
throw new InvalidItemIndex(stringIndex, "String index out of bounds: %d", stringIndex);
}
return stringStartOffset + stringIndex*StringIdItem.ITEM_SIZE;
}
示例2: getDataSectionOffset
import org.jf.dexlib2.dexbacked.raw.StringIdItem; //导入依赖的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: getStringIdItemOffset
import org.jf.dexlib2.dexbacked.raw.StringIdItem; //导入依赖的package包/类
public int getStringIdItemOffset(int stringIndex) {
if (stringIndex < 0 || stringIndex >= stringCount) {
throw new InvalidItemIndex(stringIndex, "String index out of bounds: %d", stringIndex);
}
return stringStartOffset + stringIndex*StringIdItem.ITEM_SIZE;
}
示例4: getStringIdItemOffset
import org.jf.dexlib2.dexbacked.raw.StringIdItem; //导入依赖的package包/类
public int getStringIdItemOffset(int stringIndex) {
if (stringIndex < 0 || stringIndex >= stringCount) {
throw new InvalidItemIndex(stringIndex, "String index out of bounds: %d", stringIndex);
}
return stringStartOffset + stringIndex * StringIdItem.ITEM_SIZE;
}
示例5: DexAnnotator
import org.jf.dexlib2.dexbacked.raw.StringIdItem; //导入依赖的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()));
}
}
}