本文整理了Java中com.googlecode.d2j.Field.getType()
方法的一些代码示例,展示了Field.getType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Field.getType()
方法的具体详情如下:
包路径:com.googlecode.d2j.Field
类名称:Field
方法名:getType
暂无
代码示例来源:origin: pxb1988/dex2jar
@Override
public String toString() {
return this.getOwner() + "." + this.getName() + " " + this.getType();
}
}
代码示例来源:origin: pxb1988/dex2jar
public static String escapeField(Field f) {
String owner = f.getOwner();
if (owner == null) {
owner = f.getType();
}
return escapeType(owner) + "->" + f.getName() + ":" + escapeType(f.getType());
}
代码示例来源:origin: pxb1988/dex2jar
@Override
public void visitFieldStmt(Op op, int a, int b, Field field) {
switch (op) {
case SPUT:
case SPUT_BOOLEAN:
case SPUT_BYTE:
case SPUT_CHAR:
case SPUT_OBJECT:
case SPUT_SHORT:
case SPUT_WIDE:
if (field.getOwner().equals(classNode.className)) {
String key = field.getName() + ":" + field.getType();
fs.remove(key);
DexFieldNode dn = shouldNotBeAssigned.get(key);
if (dn != null) {
//System.out.println(field.getName() + ":" + field.getType());
dn.cst = null;
}
}
break;
default:
// ignored
break;
}
}
});
代码示例来源:origin: pxb1988/dex2jar
if ((fn.access & ACC_STATIC_FINAL) == ACC_STATIC_FINAL) {
if (fn.cst == null) {
char t = fn.field.getType().charAt(0);
if (t == 'L' || t == '[') {
fs.put(fn.field.getName() + ":" + fn.field.getType(), fn);
} else if (isPrimitiveZero(fn.field.getType(), fn.cst)) {
shouldNotBeAssigned.put(fn.field.getName() + ":" + fn.field.getType(), fn);
fn.cst = getDefaultValueOfType(fn.field.getType().charAt(0));
代码示例来源:origin: pxb1988/dex2jar
public FieldIdItem uniqField(Field field) {
return uniqField(field.getOwner(), field.getName(), field.getType());
}
代码示例来源:origin: pxb1988/dex2jar
String owner = f.getOwner();
if (owner == null) {
owner = f.getType();
return ".enum " + escapeType(owner) + "->" + f.getName() + ":" + escapeType(f.getType());
代码示例来源:origin: pxb1988/dex2jar
public static String v(Field f) {
return String.format("new Field(%s,%s,%s)", v(f.getOwner()), v(f.getName()), v(f.getType()));
}
代码示例来源:origin: pxb1988/dex2jar
final int FieldCleanFlag = ~DexConstants.ACC_DECLARED_SYNCHRONIZED;
FieldVisitor fv = cv.visitField(fieldNode.access & FieldCleanFlag, fieldNode.field.getName(),
fieldNode.field.getType(), signature, value);
if (fv == null) {
return;
代码示例来源:origin: pxb1988/dex2jar
@Override
public Object visitFlocal(SmaliParser.FlocalContext ctx) {
if (dexDebugVisitor != null) {
DexLabel dexLabel = new DexLabel();
scv.visitLabel(dexLabel);
int reg = m.pareReg(ctx.r.getText());
String name;
String type;
if (ctx.v1 != null) {
Field fld = parseFieldAndUnescape("Lt;", ctx.v1.getText());
name = fld.getName();
type = fld.getType();
} else if (ctx.v2 != null) {
String txt = ctx.v2.getText();
int i = findString(txt, 1, txt.length(), '\"');
name = unescapeStr(txt.substring(0, i + 1));
type = unEscapeId(txt.substring(i + 2));
} else {
if (ctx.name2 != null) {
name = unescapeStr(ctx.name2.getText());
} else {
name = unEscapeId(ctx.name1.getText());
}
type = unEscapeId(ctx.type.getText());
}
String sig = ctx.sig == null ? null : unescapeStr(ctx.sig.getText());
dexDebugVisitor.visitStartLocal(reg, dexLabel, name, type, sig);
}
return null;
}
代码示例来源:origin: pxb1988/dex2jar
dav.visitEnum(name, f.getType(), f.getName());
} else if (o instanceof DexType) {
dav.visit(name, Type.getType(((DexType) o).desc));
代码示例来源:origin: pxb1988/dex2jar
appendAccess(f.access | ACCESS_FIELD, buff);
Field field = f.field;
buff.append(escapeId(f.field.getName())).append(":").append(escapeType(field.getType()));
if (f.cst != null) {
buff.append(" = ");
代码示例来源:origin: pxb1988/dex2jar
case IGET_SHORT:
case IGET_WIDE:
list.add(nAssign(locals[a], nField(locals[b], field.getOwner(), field.getName(), field.getType())));
break;
case IPUT:
case IPUT_SHORT:
case IPUT_WIDE:
list.add(nAssign(nField(locals[b], field.getOwner(), field.getName(), field.getType()), locals[a]));
break;
case SGET:
case SGET_SHORT:
case SGET_WIDE:
list.add(nAssign(locals[a], nStaticField(field.getOwner(), field.getName(), field.getType())));
break;
case SPUT:
case SPUT_SHORT:
case SPUT_WIDE:
list.add(nAssign(nStaticField(field.getOwner(), field.getName(), field.getType()), locals[a]));
break;
default:
代码示例来源:origin: pxb1988/dex2jar
public static void acceptAnnotationItem(DexAnnotationVisitor dav, String name, Object o) {
if (o instanceof Object[]) {
DexAnnotationVisitor arrayVisitor = dav.visitArray(name);
if (arrayVisitor != null) {
Object[] array = (Object[]) o;
for (Object e : array) {
acceptAnnotationItem(arrayVisitor, null, e);
}
arrayVisitor.visitEnd();
}
} else if (o instanceof DexAnnotationNode) {
DexAnnotationNode ann = (DexAnnotationNode) o;
DexAnnotationVisitor av = dav.visitAnnotation(name, ann.type);
if (av != null) {
for (DexAnnotationNode.Item item : ann.items) {
acceptAnnotationItem(av, item.name, item.value);
}
av.visitEnd();
}
} else if (o instanceof Field) {
Field f = (Field) o;
dav.visitEnum(name, f.getType(), f.getName());
} else {
dav.visit(name, o);
}
}
代码示例来源:origin: pxb1988/dex2jar
case SGET_WIDE:
Field field = ((FieldStmtNode) insn).field;
return b(nStaticField(field.getOwner(), field.getName(), field.getType()));
case NEW_INSTANCE:
return b(nNew(((TypeStmtNode) insn).type));
代码示例来源:origin: pxb1988/dex2jar
switch (mh.getType()) {
case MethodHandle.INSTANCE_GET:
h = new Handle(Opcodes.H_GETFIELD, toInternalName(mh.getField().getOwner()), mh.getField().getName(), mh.getField().getType());
break;
case MethodHandle.INSTANCE_PUT:
h = new Handle(Opcodes.H_PUTFIELD, toInternalName(mh.getField().getOwner()), mh.getField().getName(), mh.getField().getType());
break;
case MethodHandle.STATIC_GET:
h = new Handle(Opcodes.H_GETFIELD, toInternalName(mh.getField().getOwner()), mh.getField().getName(), mh.getField().getType());
break;
case MethodHandle.STATIC_PUT:
h = new Handle(Opcodes.H_PUTFIELD, toInternalName(mh.getField().getOwner()), mh.getField().getName(), mh.getField().getType());
break;
case MethodHandle.INVOKE_INSTANCE:
代码示例来源:origin: pxb1988/dex2jar
case SPUT_WIDE: {
Field field = ((FieldStmtNode) insn).field;
emit(nAssign(nStaticField(field.getOwner(), field.getName(), field.getType()), local));
return null;
case IGET_WIDE: {
Field field = ((FieldStmtNode) insn).field;
return b(nField(local, field.getOwner(), field.getName(), field.getType()));
代码示例来源:origin: pxb1988/dex2jar
case IPUT_WIDE:
Field field = ((FieldStmtNode) insn).field;
emit(nAssign(nField(local1, field.getOwner(), field.getName(), field.getType()), local2));
return null;
代码示例来源:origin: SparkInLee/dexdiff
@Override
public String toString() {
return this.getOwner() + "." + this.getName() + " " + this.getType();
}
}
代码示例来源:origin: SparkInLee/dexdiff
public FieldIdItem uniqField(Field field) {
return uniqField(field.getOwner(), field.getName(), field.getType());
}
代码示例来源:origin: SparkInLee/dexdiff
public static String v(Field f) {
return String.format("new Field(%s,%s,%s)", v(f.getOwner()), v(f.getName()), v(f.getType()));
}
内容来源于网络,如有侵权,请联系作者删除!