org.jf.dexlib2.iface.Field.getDefiningClass()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(149)

本文整理了Java中org.jf.dexlib2.iface.Field.getDefiningClass()方法的一些代码示例,展示了Field.getDefiningClass()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Field.getDefiningClass()方法的具体详情如下:
包路径:org.jf.dexlib2.iface.Field
类名称:Field
方法名:getDefiningClass

Field.getDefiningClass介绍

[英]Gets the type of the class that defines this field.
[中]获取定义此字段的类的类型。

代码示例

代码示例来源:origin: Tencent/tinker

for (Field field : classDef.getFields()) {
  final BuilderField builderField = dexBuilder.internField(
      field.getDefiningClass(),
      field.getName(),
      field.getType(),

代码示例来源:origin: KB5201314/ZjDroid

public static ImmutableField of(Field field) {
  if (field instanceof  ImmutableField) {
    return (ImmutableField)field;
  }
  return new ImmutableField(
      field.getDefiningClass(),
      field.getName(),
      field.getType(),
      field.getAccessFlags(),
      field.getInitialValue(),
      field.getAnnotations());
}

代码示例来源:origin: testwhat/SmaliEx

public static ImmutableField of(Field field) {
  if (field instanceof  ImmutableField) {
    return (ImmutableField)field;
  }
  return new ImmutableField(
      field.getDefiningClass(),
      field.getName(),
      field.getType(),
      field.getAccessFlags(),
      field.getInitialValue(),
      field.getAnnotations());
}

代码示例来源:origin: org.smali/dexlib2

public static ImmutableField of(Field field) {
  if (field instanceof  ImmutableField) {
    return (ImmutableField)field;
  }
  return new ImmutableField(
      field.getDefiningClass(),
      field.getName(),
      field.getType(),
      field.getAccessFlags(),
      field.getInitialValue(),
      field.getAnnotations());
}

代码示例来源:origin: com.taobao.android/dex_patch

@Override
protected Field reField(Field field) {
  String name = field.getName();
  String newType;
  boolean isBasic = false;
  boolean isArray = false;
  if (field.getType().startsWith("[")) {
    isArray = true;
  }
  if (basicType.containsKey(field.getType())) {
    newType = field.getType();
    isBasic = true;
  } else {
    newType = DefineUtils.getDalvikClassName(field.getType());
  }
  String defineClass = DefineUtils.getDalvikClassName(field.getDefiningClass());
  return new ImmutableField(
      reType,
      classProcessor.filedProcess(defineClass, isBasic ? basicType.get(newType) : newType + (isArray ? "[]" : ""), name).fieldName,
      isBasic ? newType :
          DefineUtils.getDefineClassName(classProcessor.classProcess(isBasic ? basicType.get(newType) : newType).className, isArray),
      field.getAccessFlags(),
      field.getInitialValue(),
      getAnnotation(field.getAnnotations()));
}

代码示例来源:origin: com.tencent.tinker/tinker-patch-lib

for (Field field : classDef.getFields()) {
  final BuilderField builderField = dexBuilder.internField(
      field.getDefiningClass(),
      field.getName(),
      field.getType(),

代码示例来源:origin: testwhat/SmaliEx

containingClass = field.getDefiningClass();
containingClass = field.getDefiningClass();

代码示例来源:origin: org.smali/baksmali

containingClass = field.getDefiningClass();
containingClass = field.getDefiningClass();

代码示例来源:origin: com.taobao.android/dex_patch

containingClass = field.getDefiningClass();
containingClass = field.getDefiningClass();

相关文章