当前位置: 首页>>代码示例>>Java>>正文


Java StringIdItem类代码示例

本文整理汇总了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;
}
 
开发者ID:Miracle963,项目名称:zjdroid,代码行数:10,代码来源:DexBackedDexFile.java

示例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;
}
 
开发者ID:niranjan94,项目名称:show-java,代码行数:10,代码来源:DexWriter.java

示例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;
}
 
开发者ID:johnlee175,项目名称:dex,代码行数:7,代码来源:DexBackedDexFile.java

示例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;
}
 
开发者ID:niranjan94,项目名称:show-java,代码行数:7,代码来源:DexBackedDexFile.java

示例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()));
        }
    }
}
 
开发者ID:niranjan94,项目名称:show-java,代码行数:67,代码来源:DexAnnotator.java


注:本文中的org.jf.dexlib2.dexbacked.raw.StringIdItem类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。