@Override public void visitTypeInsn(final int opcode, final String type) { minSize += 3; maxSize += 3; if (mv != null) { mv.visitTypeInsn(opcode, type); } }
/** * Visits a type instruction. A type instruction is an instruction that * takes the internal name of a class as parameter. * * @param opcode * the opcode of the type instruction to be visited. This opcode * is either NEW, ANEWARRAY, CHECKCAST or INSTANCEOF. * @param type * the operand of the instruction to be visited. This operand * must be the internal name of an object or array class (see * {@link Type#getInternalName() getInternalName}). */ public void visitTypeInsn(int opcode, String type) { if (mv != null) { mv.visitTypeInsn(opcode, type); } }
/** * Generates a type dependent instruction. * * @param opcode the instruction's opcode. * @param type the instruction's operand. */ private void typeInsn(final int opcode, final Type type){ String desc; if(type.getSort() == Type.ARRAY) { desc = type.getDescriptor(); } else { desc = type.getInternalName(); } mv.visitTypeInsn(opcode, desc); }
@Override public void visitTypeInsn(final int opcode, final String type) { mv.visitTypeInsn(opcode, type); // ANEWARRAY, CHECKCAST or INSTANCEOF don't change stack if (constructor && opcode == NEW) { pushValue(OTHER); } }
/** * Generates a type dependent instruction. * * @param opcode * the instruction's opcode. * @param type * the instruction's operand. */ private void typeInsn(final int opcode, final Type type) { mv.visitTypeInsn(opcode, type.getInternalName()); }
public void anew(final Type type) { mv.visitTypeInsn(Opcodes.NEW, type.getInternalName()); }
public void checkcast(final Type type) { mv.visitTypeInsn(Opcodes.CHECKCAST, type.getInternalName()); }
public void instanceOf(final Type type) { mv.visitTypeInsn(Opcodes.INSTANCEOF, type.getInternalName()); }
@Override public void visitTypeInsn(final int opcode, final String type) { if (opcode == Opcodes.NEW) { if (labels == null) { Label l = new Label(); labels = new ArrayList<Label>(3); labels.add(l); if (mv != null) { mv.visitLabel(l); } } for (int i = 0; i < labels.size(); ++i) { uninitializedTypes.put(labels.get(i), type); } } if (mv != null) { mv.visitTypeInsn(opcode, type); } execute(opcode, 0, type); }
break; default: mv.visitTypeInsn(Opcodes.ANEWARRAY, type.getInternalName()); return;
if(k.isPrimitive()) mv.visitTypeInsn(CHECKCAST, Type.getType(boxClass(k)).getInternalName()); mv.visitTypeInsn(Opcodes.NEW, className); mv.visitInsn(DUP);
mv.visitTypeInsn(opcode, readClass(u + 1, c)); u += 3; break;
mv.visitTypeInsn(opcode, readClass(v + 1, c)); v += 3; break;