本文整理汇总了Java中org.jf.dexlib2.dexbacked.raw.util.DexAnnotator类的典型用法代码示例。如果您正苦于以下问题:Java DexAnnotator类的具体用法?Java DexAnnotator怎么用?Java DexAnnotator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DexAnnotator类属于org.jf.dexlib2.dexbacked.raw.util包,在下文中一共展示了DexAnnotator类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: makeAnnotator
import org.jf.dexlib2.dexbacked.raw.util.DexAnnotator; //导入依赖的package包/类
@Nonnull
public static SectionAnnotator makeAnnotator(@Nonnull DexAnnotator annotator, @Nonnull MapItem mapItem) {
return new SectionAnnotator(annotator, mapItem) {
@Nonnull @Override public String getItemName() {
return "annotation_set_item";
}
@Override
public void annotateItem(@Nonnull AnnotatedBytes out, int itemIndex, @Nullable String itemIdentity) {
int size = dexFile.readSmallUint(out.getCursor());
out.annotate(4, "size = %d", size);
for (int i=0; i<size; i++) {
int annotationOffset = dexFile.readSmallUint(out.getCursor());
out.annotate(4, AnnotationItem.getReferenceAnnotation(dexFile, annotationOffset));
}
}
@Override public int getItemAlignment() {
return 4;
}
};
}
开发者ID:CvvT,项目名称:andbg,代码行数:24,代码来源:AnnotationSetItem.java
示例2: makeAnnotator
import org.jf.dexlib2.dexbacked.raw.util.DexAnnotator; //导入依赖的package包/类
@Nonnull
public static SectionAnnotator makeAnnotator(@Nonnull DexAnnotator annotator, @Nonnull MapItem mapItem) {
return new SectionAnnotator(annotator, mapItem) {
@Nonnull @Override public String getItemName() {
return "proto_id_item";
}
@Override
protected void annotateItem(@Nonnull AnnotatedBytes out, int itemIndex, @Nullable String itemIdentity) {
int shortyIndex = dexFile.readSmallUint(out.getCursor());
out.annotate(4, "shorty_idx = %s", StringIdItem.getReferenceAnnotation(dexFile, shortyIndex));
int returnTypeIndex = dexFile.readSmallUint(out.getCursor());
out.annotate(4, "return_type_idx = %s", TypeIdItem.getReferenceAnnotation(dexFile, returnTypeIndex));
int parametersOffset = dexFile.readSmallUint(out.getCursor());
out.annotate(4, "parameters_off = %s", TypeListItem.getReferenceAnnotation(dexFile, parametersOffset));
}
};
}
开发者ID:CvvT,项目名称:andbg,代码行数:21,代码来源:ProtoIdItem.java
示例3: makeAnnotator
import org.jf.dexlib2.dexbacked.raw.util.DexAnnotator; //导入依赖的package包/类
@Nonnull
public static SectionAnnotator makeAnnotator(@Nonnull DexAnnotator annotator, @Nonnull MapItem mapItem) {
return new SectionAnnotator(annotator, mapItem) {
@Nonnull @Override public String getItemName() {
return "annotation_set_ref_list";
}
@Override
protected void annotateItem(@Nonnull AnnotatedBytes out, int itemIndex, @Nullable String itemIdentity) {
int size = dexFile.readSmallUint(out.getCursor());
out.annotate(4, "size = %d", size);
for (int i=0; i<size; i++) {
int annotationSetOffset = dexFile.readSmallUint(out.getCursor());
out.annotate(4, "annotation_set_item[0x%x]", annotationSetOffset);
}
}
@Override public int getItemAlignment() {
return 4;
}
};
}
开发者ID:CvvT,项目名称:andbg,代码行数:24,代码来源:AnnotationSetRefList.java
示例4: makeAnnotator
import org.jf.dexlib2.dexbacked.raw.util.DexAnnotator; //导入依赖的package包/类
@Nonnull
public static SectionAnnotator makeAnnotator(@Nonnull DexAnnotator annotator, @Nonnull MapItem mapItem) {
return new SectionAnnotator(annotator, mapItem) {
@Nonnull @Override public String getItemName() {
return "string_id_item";
}
@Override
public void annotateItem(@Nonnull AnnotatedBytes out, int itemIndex, @Nullable String itemIdentity) {
int stringDataOffset = dexFile.readSmallUint(out.getCursor());
try {
String stringValue = dexFile.getString(itemIndex);
out.annotate(4, "string_data_item[0x%x]: \"%s\"", stringDataOffset,
StringUtils.escapeString(stringValue));
return;
} catch (Exception ex) {
System.err.print("Error while resolving string value at index: ");
System.err.print(itemIndex);
ex.printStackTrace(System.err);
}
out.annotate(4, "string_id_item[0x%x]", stringDataOffset);
}
};
}
开发者ID:CvvT,项目名称:andbg,代码行数:26,代码来源:StringIdItem.java
示例5: makeAnnotator
import org.jf.dexlib2.dexbacked.raw.util.DexAnnotator; //导入依赖的package包/类
@Nonnull
public static SectionAnnotator makeAnnotator(@Nonnull DexAnnotator annotator, @Nonnull MapItem mapItem) {
return new SectionAnnotator(annotator, mapItem) {
@Nonnull @Override public String getItemName() {
return "method_id_item";
}
@Override
public void annotateItem(@Nonnull AnnotatedBytes out, int itemIndex, @Nullable String itemIdentity) {
int classIndex = dexFile.readUshort(out.getCursor());
out.annotate(2, "class_idx = %s", TypeIdItem.getReferenceAnnotation(dexFile, classIndex));
int protoIndex = dexFile.readUshort(out.getCursor());
out.annotate(2, "proto_idx = %s", ProtoIdItem.getReferenceAnnotation(dexFile, protoIndex));
int nameIndex = dexFile.readSmallUint(out.getCursor());
out.annotate(4, "name_idx = %s", StringIdItem.getReferenceAnnotation(dexFile, nameIndex));
}
};
}
开发者ID:CvvT,项目名称:andbg,代码行数:21,代码来源:MethodIdItem.java
示例6: makeAnnotator
import org.jf.dexlib2.dexbacked.raw.util.DexAnnotator; //导入依赖的package包/类
@Nonnull
public static SectionAnnotator makeAnnotator(@Nonnull DexAnnotator annotator, @Nonnull MapItem mapItem) {
return new SectionAnnotator(annotator, mapItem) {
@Nonnull @Override public String getItemName() {
return "type_list";
}
@Override
protected void annotateItem(@Nonnull AnnotatedBytes out, int itemIndex, @Nullable String itemIdentity) {
int size = dexFile.readSmallUint(out.getCursor());
out.annotate(4, "size: %d", size);
for (int i=0; i<size; i++) {
int typeIndex = dexFile.readUshort(out.getCursor());
out.annotate(2, TypeIdItem.getReferenceAnnotation(dexFile, typeIndex));
}
}
@Override public int getItemAlignment() {
return 4;
}
};
}
开发者ID:CvvT,项目名称:andbg,代码行数:24,代码来源:TypeListItem.java
示例7: makeAnnotator
import org.jf.dexlib2.dexbacked.raw.util.DexAnnotator; //导入依赖的package包/类
@Nonnull
public static SectionAnnotator makeAnnotator(@Nonnull DexAnnotator annotator, @Nonnull MapItem mapItem) {
return new SectionAnnotator(annotator, mapItem) {
@Nonnull @Override public String getItemName() {
return "string_data_item";
}
@Override
protected void annotateItem(@Nonnull AnnotatedBytes out, int itemIndex, @Nullable String itemIdentity) {
DexReader reader = dexFile.readerAt(out.getCursor());
int utf16Length = reader.readSmallUleb128();
out.annotateTo(reader.getOffset(), "utf16_size = %d", utf16Length);
String value = reader.readString(utf16Length);
out.annotateTo(reader.getOffset() + 1, "data = \"%s\"", StringUtils.escapeString(value));
}
};
}
开发者ID:CvvT,项目名称:andbg,代码行数:19,代码来源:StringDataItem.java
示例8: makeAnnotator
import org.jf.dexlib2.dexbacked.raw.util.DexAnnotator; //导入依赖的package包/类
@Nonnull
public static SectionAnnotator makeAnnotator(@Nonnull DexAnnotator annotator, @Nonnull MapItem mapItem) {
return new SectionAnnotator(annotator, mapItem) {
@Nonnull @Override public String getItemName() {
return "field_id_item";
}
@Override
protected void annotateItem(@Nonnull AnnotatedBytes out, int itemIndex, @Nullable String itemIdentity) {
int classIndex = dexFile.readUshort(out.getCursor());
out.annotate(2, "class_idx = %s", TypeIdItem.getReferenceAnnotation(dexFile, classIndex));
int typeIndex = dexFile.readUshort(out.getCursor());
out.annotate(2, "return_type_idx = %s", TypeIdItem.getReferenceAnnotation(dexFile, typeIndex));
int nameIndex = dexFile.readSmallUint(out.getCursor());
out.annotate(4, "name_idx = %s", StringIdItem.getReferenceAnnotation(dexFile, nameIndex));
}
};
}
开发者ID:CvvT,项目名称:andbg,代码行数:21,代码来源:FieldIdItem.java
示例9: makeAnnotator
import org.jf.dexlib2.dexbacked.raw.util.DexAnnotator; //导入依赖的package包/类
@Nonnull
public static SectionAnnotator makeAnnotator(@Nonnull DexAnnotator annotator, @Nonnull MapItem mapItem) {
return new SectionAnnotator(annotator, mapItem) {
@Nonnull @Override public String getItemName() {
return "annotation_item";
}
@Override
protected void annotateItem(@Nonnull AnnotatedBytes out, int itemIndex, @Nullable String itemIdentity) {
int visibility = dexFile.readUbyte(out.getCursor());
out.annotate(1, "visibility = %d: %s", visibility, getAnnotationVisibility(visibility));
DexReader reader = dexFile.readerAt(out.getCursor());
EncodedValue.annotateEncodedAnnotation(out, reader);
}
};
}
开发者ID:CvvT,项目名称:andbg,代码行数:19,代码来源:AnnotationItem.java
示例10: makeAnnotator
import org.jf.dexlib2.dexbacked.raw.util.DexAnnotator; //导入依赖的package包/类
public static SectionAnnotator makeAnnotator( DexAnnotator annotator, MapItem mapItem) {
return new SectionAnnotator(annotator, mapItem) {
@Override public String getItemName() {
return "annotation_set_item";
}
@Override
public void annotateItem( AnnotatedBytes out, int itemIndex, String itemIdentity) {
int size = dexFile.readSmallUint(out.getCursor());
out.annotate(4, "size = %d", size);
for (int i=0; i<size; i++) {
int annotationOffset = dexFile.readSmallUint(out.getCursor());
out.annotate(4, AnnotationItem.getReferenceAnnotation(dexFile, annotationOffset));
}
}
@Override public int getItemAlignment() {
return 4;
}
};
}
开发者ID:AndreJCL,项目名称:JCL,代码行数:23,代码来源:AnnotationSetItem.java
示例11: makeAnnotator
import org.jf.dexlib2.dexbacked.raw.util.DexAnnotator; //导入依赖的package包/类
public static SectionAnnotator makeAnnotator( DexAnnotator annotator, MapItem mapItem) {
return new SectionAnnotator(annotator, mapItem) {
@Override public String getItemName() {
return "proto_id_item";
}
@Override
protected void annotateItem( AnnotatedBytes out, int itemIndex, String itemIdentity) {
int shortyIndex = dexFile.readSmallUint(out.getCursor());
out.annotate(4, "shorty_idx = %s", StringIdItem.getReferenceAnnotation(dexFile, shortyIndex));
int returnTypeIndex = dexFile.readSmallUint(out.getCursor());
out.annotate(4, "return_type_idx = %s", TypeIdItem.getReferenceAnnotation(dexFile, returnTypeIndex));
int parametersOffset = dexFile.readSmallUint(out.getCursor());
out.annotate(4, "parameters_off = %s", TypeListItem.getReferenceAnnotation(dexFile, parametersOffset));
}
};
}
开发者ID:AndreJCL,项目名称:JCL,代码行数:20,代码来源:ProtoIdItem.java
示例12: makeAnnotator
import org.jf.dexlib2.dexbacked.raw.util.DexAnnotator; //导入依赖的package包/类
public static SectionAnnotator makeAnnotator( DexAnnotator annotator, MapItem mapItem) {
return new SectionAnnotator(annotator, mapItem) {
@Override public String getItemName() {
return "annotation_set_ref_list";
}
@Override
protected void annotateItem( AnnotatedBytes out, int itemIndex, String itemIdentity) {
int size = dexFile.readSmallUint(out.getCursor());
out.annotate(4, "size = %d", size);
for (int i=0; i<size; i++) {
int annotationSetOffset = dexFile.readSmallUint(out.getCursor());
out.annotate(4, "annotation_set_item[0x%x]", annotationSetOffset);
}
}
@Override public int getItemAlignment() {
return 4;
}
};
}
开发者ID:AndreJCL,项目名称:JCL,代码行数:23,代码来源:AnnotationSetRefList.java
示例13: makeAnnotator
import org.jf.dexlib2.dexbacked.raw.util.DexAnnotator; //导入依赖的package包/类
public static SectionAnnotator makeAnnotator( DexAnnotator annotator, MapItem mapItem) {
return new SectionAnnotator(annotator, mapItem) {
@Override public String getItemName() {
return "string_id_item";
}
@Override
public void annotateItem( AnnotatedBytes out, int itemIndex, String itemIdentity) {
int stringDataOffset = dexFile.readSmallUint(out.getCursor());
try {
String stringValue = dexFile.getString(itemIndex);
out.annotate(4, "string_data_item[0x%x]: \"%s\"", stringDataOffset,
StringUtils.escapeString(stringValue));
return;
} catch (Exception ex) {
System.err.print("Error while resolving string value at index: ");
System.err.print(itemIndex);
ex.printStackTrace(System.err);
}
out.annotate(4, "string_id_item[0x%x]", stringDataOffset);
}
};
}
开发者ID:AndreJCL,项目名称:JCL,代码行数:25,代码来源:StringIdItem.java
示例14: makeAnnotator
import org.jf.dexlib2.dexbacked.raw.util.DexAnnotator; //导入依赖的package包/类
public static SectionAnnotator makeAnnotator( DexAnnotator annotator, MapItem mapItem) {
return new SectionAnnotator(annotator, mapItem) {
@Override public String getItemName() {
return "method_id_item";
}
@Override
public void annotateItem( AnnotatedBytes out, int itemIndex, String itemIdentity) {
int classIndex = dexFile.readUshort(out.getCursor());
out.annotate(2, "class_idx = %s", TypeIdItem.getReferenceAnnotation(dexFile, classIndex));
int protoIndex = dexFile.readUshort(out.getCursor());
out.annotate(2, "proto_idx = %s", ProtoIdItem.getReferenceAnnotation(dexFile, protoIndex));
int nameIndex = dexFile.readSmallUint(out.getCursor());
out.annotate(4, "name_idx = %s", StringIdItem.getReferenceAnnotation(dexFile, nameIndex));
}
};
}
开发者ID:AndreJCL,项目名称:JCL,代码行数:20,代码来源:MethodIdItem.java
示例15: makeAnnotator
import org.jf.dexlib2.dexbacked.raw.util.DexAnnotator; //导入依赖的package包/类
public static SectionAnnotator makeAnnotator( DexAnnotator annotator, MapItem mapItem) {
return new SectionAnnotator(annotator, mapItem) {
@Override public String getItemName() {
return "type_list";
}
@Override
protected void annotateItem( AnnotatedBytes out, int itemIndex, String itemIdentity) {
int size = dexFile.readSmallUint(out.getCursor());
out.annotate(4, "size: %d", size);
for (int i=0; i<size; i++) {
int typeIndex = dexFile.readUshort(out.getCursor());
out.annotate(2, TypeIdItem.getReferenceAnnotation(dexFile, typeIndex));
}
}
@Override public int getItemAlignment() {
return 4;
}
};
}
开发者ID:AndreJCL,项目名称:JCL,代码行数:23,代码来源:TypeListItem.java
示例16: makeAnnotator
import org.jf.dexlib2.dexbacked.raw.util.DexAnnotator; //导入依赖的package包/类
public static SectionAnnotator makeAnnotator( DexAnnotator annotator, MapItem mapItem) {
return new SectionAnnotator(annotator, mapItem) {
@Override public String getItemName() {
return "string_data_item";
}
@Override
protected void annotateItem( AnnotatedBytes out, int itemIndex, String itemIdentity) {
DexReader reader = dexFile.readerAt(out.getCursor());
int utf16Length = reader.readSmallUleb128();
out.annotateTo(reader.getOffset(), "utf16_size = %d", utf16Length);
String value = reader.readString(utf16Length);
out.annotateTo(reader.getOffset() + 1, "data = \"%s\"", StringUtils.escapeString(value));
}
};
}
开发者ID:AndreJCL,项目名称:JCL,代码行数:18,代码来源:StringDataItem.java
示例17: makeAnnotator
import org.jf.dexlib2.dexbacked.raw.util.DexAnnotator; //导入依赖的package包/类
public static SectionAnnotator makeAnnotator( DexAnnotator annotator, MapItem mapItem) {
return new SectionAnnotator(annotator, mapItem) {
@Override public String getItemName() {
return "field_id_item";
}
@Override
protected void annotateItem( AnnotatedBytes out, int itemIndex, String itemIdentity) {
int classIndex = dexFile.readUshort(out.getCursor());
out.annotate(2, "class_idx = %s", TypeIdItem.getReferenceAnnotation(dexFile, classIndex));
int typeIndex = dexFile.readUshort(out.getCursor());
out.annotate(2, "return_type_idx = %s", TypeIdItem.getReferenceAnnotation(dexFile, typeIndex));
int nameIndex = dexFile.readSmallUint(out.getCursor());
out.annotate(4, "name_idx = %s", StringIdItem.getReferenceAnnotation(dexFile, nameIndex));
}
};
}
开发者ID:AndreJCL,项目名称:JCL,代码行数:20,代码来源:FieldIdItem.java
示例18: makeAnnotator
import org.jf.dexlib2.dexbacked.raw.util.DexAnnotator; //导入依赖的package包/类
public static SectionAnnotator makeAnnotator( DexAnnotator annotator, MapItem mapItem) {
return new SectionAnnotator(annotator, mapItem) {
@Override public String getItemName() {
return "annotation_item";
}
@Override
protected void annotateItem( AnnotatedBytes out, int itemIndex, String itemIdentity) {
int visibility = dexFile.readUbyte(out.getCursor());
out.annotate(1, "visibility = %d: %s", visibility, getAnnotationVisibility(visibility));
DexReader reader = dexFile.readerAt(out.getCursor());
EncodedValue.annotateEncodedAnnotation(out, reader);
}
};
}
开发者ID:AndreJCL,项目名称:JCL,代码行数:18,代码来源:AnnotationItem.java
示例19: makeAnnotator
import org.jf.dexlib2.dexbacked.raw.util.DexAnnotator; //导入依赖的package包/类
@Nonnull
public static SectionAnnotator makeAnnotator(@Nonnull DexAnnotator annotator, @Nonnull MapItem mapItem) {
return new SectionAnnotator(annotator, mapItem) {
@Nonnull
@Override
public String getItemName() {
return "annotation_set_item";
}
@Override
public void annotateItem(@Nonnull AnnotatedBytes out, int itemIndex, @Nullable String itemIdentity) {
int size = dexFile.readSmallUint(out.getCursor());
out.annotate(4, "size = %d", size);
for (int i = 0; i < size; i++) {
int annotationOffset = dexFile.readSmallUint(out.getCursor());
out.annotate(4, AnnotationItem.getReferenceAnnotation(dexFile, annotationOffset));
}
}
@Override
public int getItemAlignment() {
return 4;
}
};
}
开发者ID:niranjan94,项目名称:show-java,代码行数:27,代码来源:AnnotationSetItem.java
示例20: makeAnnotator
import org.jf.dexlib2.dexbacked.raw.util.DexAnnotator; //导入依赖的package包/类
@Nonnull
public static SectionAnnotator makeAnnotator(@Nonnull DexAnnotator annotator, @Nonnull MapItem mapItem) {
return new SectionAnnotator(annotator, mapItem) {
@Nonnull
@Override
public String getItemName() {
return "proto_id_item";
}
@Override
protected void annotateItem(@Nonnull AnnotatedBytes out, int itemIndex, @Nullable String itemIdentity) {
int shortyIndex = dexFile.readSmallUint(out.getCursor());
out.annotate(4, "shorty_idx = %s", StringIdItem.getReferenceAnnotation(dexFile, shortyIndex));
int returnTypeIndex = dexFile.readSmallUint(out.getCursor());
out.annotate(4, "return_type_idx = %s", TypeIdItem.getReferenceAnnotation(dexFile, returnTypeIndex));
int parametersOffset = dexFile.readSmallUint(out.getCursor());
out.annotate(4, "parameters_off = %s", TypeListItem.getReferenceAnnotation(dexFile, parametersOffset));
}
};
}
开发者ID:niranjan94,项目名称:show-java,代码行数:23,代码来源:ProtoIdItem.java
注:本文中的org.jf.dexlib2.dexbacked.raw.util.DexAnnotator类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论