@Override public void visitFieldInsn(final int opcode, final String owner, final String name, final String desc) { minSize += 3; maxSize += 3; if (mv != null) { mv.visitFieldInsn(opcode, owner, name, desc); } }
public void putstatic(final String owner, final String name, final String desc) { mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc); }
public void getfield(final String owner, final String name, final String desc) { mv.visitFieldInsn(Opcodes.GETFIELD, owner, name, desc); }
public void getstatic(final String owner, final String name, final String desc) { mv.visitFieldInsn(Opcodes.GETSTATIC, owner, name, desc); }
public void putfield(final String owner, final String name, final String desc) { mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc); }
/** * Visits a field instruction. A field instruction is an instruction that * loads or stores the value of a field of an object. * * @param opcode * the opcode of the type instruction to be visited. This opcode * is either GETSTATIC, PUTSTATIC, GETFIELD or PUTFIELD. * @param owner * the internal name of the field's owner class (see * {@link Type#getInternalName() getInternalName}). * @param name * the field's name. * @param desc * the field's descriptor (see {@link Type Type}). */ public void visitFieldInsn(int opcode, String owner, String name, String desc) { if (mv != null) { mv.visitFieldInsn(opcode, owner, name, desc); } }
@Override public void visitFieldInsn(final int opcode, final String owner, final String name, final String desc) { if (mv != null) { mv.visitFieldInsn(opcode, owner, name, desc); } execute(opcode, 0, desc); }
switch (value.getSort()) { case Type.BOOLEAN: mv.visitFieldInsn(Opcodes.GETSTATIC, "java/lang/Boolean", "TYPE", CLDESC); break; case Type.CHAR: mv.visitFieldInsn(Opcodes.GETSTATIC, "java/lang/Character", "TYPE", CLDESC); break; case Type.BYTE: mv.visitFieldInsn(Opcodes.GETSTATIC, "java/lang/Byte", "TYPE", CLDESC); break; case Type.SHORT: mv.visitFieldInsn(Opcodes.GETSTATIC, "java/lang/Short", "TYPE", CLDESC); break; case Type.INT: mv.visitFieldInsn(Opcodes.GETSTATIC, "java/lang/Integer", "TYPE", CLDESC); break; case Type.FLOAT: mv.visitFieldInsn(Opcodes.GETSTATIC, "java/lang/Float", "TYPE", CLDESC); break; case Type.LONG: mv.visitFieldInsn(Opcodes.GETSTATIC, "java/lang/Long", "TYPE", CLDESC); break;
/** * Generates a get field or set field instruction. * * @param opcode * the instruction's opcode. * @param ownerType * the class in which the field is defined. * @param name * the name of the field. * @param fieldType * the type of the field. */ private void fieldInsn(final int opcode, final Type ownerType, final String name, final Type fieldType) { mv.visitFieldInsn(opcode, ownerType.getInternalName(), name, fieldType.getDescriptor()); }
@Override public void visitFieldInsn(final int opcode, final String owner, final String name, final String desc) { mv.visitFieldInsn(opcode, owner, name, desc); if (constructor) { char c = desc.charAt(0);
String idesc = readUTF8(cpIndex + 2, c); if (opcode < Opcodes.INVOKEVIRTUAL) { mv.visitFieldInsn(opcode, iowner, iname, idesc); } else { mv.visitMethodInsn(opcode, iowner, iname, idesc);
if(opcode < Opcodes.INVOKEVIRTUAL) mv.visitFieldInsn(opcode, iowner, iname, idesc);