本文整理汇总了Java中org.jf.dexlib2.iface.Field.getDefiningClass方法的典型用法代码示例。如果您正苦于以下问题:Java Field.getDefiningClass方法的具体用法?Java Field.getDefiningClass怎么用?Java Field.getDefiningClass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jf.dexlib2.iface.Field
的用法示例。
在下文中一共展示了Field.getDefiningClass方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onSimpleEdit
import org.jf.dexlib2.iface.Field; //导入方法依赖的package包/类
@Override
protected Field onSimpleEdit(Field patch, PatcherAnnotation annotation, Field target, boolean inPlace) {
// Use the static field initializer value in source only
// if not renaming, given that the static constructor in
// source would only initialize it if not renamed.
// This makes behavior predictable across compilers.
EncodedValue value = inPlace ? target.getInitialValue() : null;
value = filterInitialValue(patch, value);
onSimpleRemove(patch, annotation, target);
Field patched = new BasicField(
patch.getDefiningClass(),
patch.getName(),
patch.getType(),
patch.getAccessFlags(),
value,
annotation.getFilteredAnnotations());
return super.onSimpleEdit(patched, annotation, target, inPlace);
}
示例2: of
import org.jf.dexlib2.iface.Field; //导入方法依赖的package包/类
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());
}
示例3: onSimpleAdd
import org.jf.dexlib2.iface.Field; //导入方法依赖的package包/类
@Override
protected Field onSimpleAdd(Field patch, PatcherAnnotation annotation) {
EncodedValue value = filterInitialValue(patch, null);
return new BasicField(
patch.getDefiningClass(),
patch.getName(),
patch.getType(),
patch.getAccessFlags(),
value,
annotation.getFilteredAnnotations());
}
示例4: of
import org.jf.dexlib2.iface.Field; //导入方法依赖的package包/类
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());
}