本文整理了Java中org.jf.dexlib2.iface.Field.getAccessFlags()
方法的一些代码示例,展示了Field.getAccessFlags()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Field.getAccessFlags()
方法的具体详情如下:
包路径:org.jf.dexlib2.iface.Field
类名称:Field
方法名:getAccessFlags
[英]Gets the access flags for this field. This will be a combination of the AccessFlags.* flags that are marked as compatible for use with a field.
[中]获取此字段的访问标志。这将是AccessFlags的组合。*标记为与字段兼容的标志。
代码示例来源:origin: JesusFreke/smali
@Override public int getFieldAccessFlags(@Nonnull Field field) {
return field.getAccessFlags();
}
代码示例来源:origin: CalebFenton/simplify
.filter(f -> (f.getAccessFlags() & Opcodes.ACC_ENUM) != 0).map(Field::getName)
.collect(Collectors.toList());
fieldNames.add("$shadow_instance");
int fieldFlags = field.getAccessFlags();
if ((fieldFlags & Opcodes.ACC_SYNTHETIC) != 0 && (fieldFlags & Opcodes.ACC_PRIVATE) != 0 && (fieldFlags & Opcodes.ACC_STATIC) != 0 && (fieldFlags & Opcodes.ACC_FINAL) != 0 && field.getType().charAt(0) == '[') {
valuesFieldName = field.getName();
代码示例来源:origin: CalebFenton/simplify
private void visitFields(Iterable<? extends Field> fields, ClassWriter classWriter,
int classAccessFlags) {
for (Field field : fields) {
/*
* It's possible to declare a Smali interface with private fields. Android doesn't seem to mind, but
* the Java class loader will complain. To get around this, just set them public, which is what they
* should be anyway.
*/
int fieldAccessFlags = field.getAccessFlags();
if ((classAccessFlags & Opcodes.ACC_INTERFACE) != 0) {
if ((fieldAccessFlags & Opcodes.ACC_PRIVATE) != 0) {
fieldAccessFlags &= ~Opcodes.ACC_PRIVATE;
fieldAccessFlags |= Opcodes.ACC_PUBLIC;
}
}
String name = field.getName();
String desc = field.getType();
String signature = null;
Object value = null;
classWriter.visitField(fieldAccessFlags, name, desc, signature, value);
}
}
代码示例来源:origin: Sable/soot
/**
*
* @return the Soot equivalent of a field
*/
public static SootField makeSootField(Field f) {
String name = f.getName();
Type type = DexType.toSoot(f.getType());
int flags = f.getAccessFlags();
SootField sf = Scene.v().makeSootField(name, type, flags);
DexField.addConstantTag(sf, f);
return sf;
}
}
代码示例来源:origin: Tencent/tinker
field.getName(),
field.getType(),
field.getAccessFlags(),
field.getInitialValue(),
field.getAnnotations()
代码示例来源:origin: testwhat/SmaliEx
public int getAccessFlags() {
return field.getAccessFlags();
}
代码示例来源:origin: com.ibm.wala/com.ibm.wala.dalvik
@Override
public boolean isPublic() {
return (eField.getAccessFlags() & PUBLIC.getValue()) != 0;
}
代码示例来源:origin: wala/WALA
@Override
public boolean isFinal() {
return (eField.getAccessFlags() & FINAL.getValue()) != 0;
}
代码示例来源:origin: wala/WALA
@Override
public boolean isStatic() {
return (eField.getAccessFlags() & STATIC.getValue()) != 0;
}
代码示例来源:origin: com.ibm.wala/com.ibm.wala.dalvik
@Override
public boolean isFinal() {
return (eField.getAccessFlags() & FINAL.getValue()) != 0;
}
代码示例来源:origin: com.ibm.wala/com.ibm.wala.dalvik
@Override
public boolean isVolatile() {
return (eField.getAccessFlags() & VOLATILE.getValue()) != 0;
}
代码示例来源:origin: com.ibm.wala/com.ibm.wala.dalvik
@Override
public boolean isPrivate() {
return (eField.getAccessFlags() & PRIVATE.getValue()) != 0;
}
代码示例来源:origin: wala/WALA
@Override
public boolean isPrivate() {
return (eField.getAccessFlags() & PRIVATE.getValue()) != 0;
}
代码示例来源:origin: wala/WALA
@Override
public boolean isProtected() {
return (eField.getAccessFlags() & PROTECTED.getValue()) != 0;
}
代码示例来源:origin: wala/WALA
@Override
public boolean isPublic() {
return (eField.getAccessFlags() & PUBLIC.getValue()) != 0;
}
代码示例来源:origin: wala/WALA
@Override
public boolean isVolatile() {
return (eField.getAccessFlags() & VOLATILE.getValue()) != 0;
}
代码示例来源:origin: com.ibm.wala/com.ibm.wala.dalvik
@Override
public boolean isProtected() {
return (eField.getAccessFlags() & PROTECTED.getValue()) != 0;
}
代码示例来源: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: 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());
}
内容来源于网络,如有侵权,请联系作者删除!