@Override public void visitVarInsn(final int opcode, final int var) { Type type; switch (opcode) { case Opcodes.LLOAD: case Opcodes.LSTORE: type = Type.LONG_TYPE; break; case Opcodes.DLOAD: case Opcodes.DSTORE: type = Type.DOUBLE_TYPE; break; case Opcodes.FLOAD: case Opcodes.FSTORE: type = Type.FLOAT_TYPE; break; case Opcodes.ILOAD: case Opcodes.ISTORE: type = Type.INT_TYPE; break; default: // case Opcodes.ALOAD: // case Opcodes.ASTORE: // case RET: type = OBJECT_TYPE; break; } mv.visitVarInsn(opcode, remap(var, type)); }
@Override public void visitLocalVariable( final String name, final String descriptor, final String signature, final Label start, final Label end, final int index) { int remappedIndex = remap(index, Type.getType(descriptor)); super.visitLocalVariable(name, descriptor, signature, start, end, remappedIndex); }
@Override public void visitLocalVariable(final String name, final String desc, final String signature, final Label start, final Label end, final int index) { int newIndex = remap(index, Type.getType(desc)); mv.visitLocalVariable(name, desc, signature, start, end, newIndex); }
@Override public void visitIincInsn(final int var, final int increment) { super.visitIincInsn(remap(var, Type.INT_TYPE), increment); }
@Override public AnnotationVisitor visitLocalVariableAnnotation(int typeRef, TypePath typePath, Label[] start, Label[] end, int[] index, String desc, boolean visible) { Type t = Type.getType(desc); int[] newIndex = new int[index.length]; for (int i = 0; i < newIndex.length; ++i) { newIndex[i] = remap(index[i], t); } return mv.visitLocalVariableAnnotation(typeRef, typePath, start, end, newIndex, desc, visible); }
@Override public void visitLocalVariable( final String name, final String descriptor, final String signature, final Label start, final Label end, final int index) { int remappedIndex = remap(index, Type.getType(descriptor)); super.visitLocalVariable(name, descriptor, signature, start, end, remappedIndex); }
@Override public void visitLocalVariable( final String name, final String descriptor, final String signature, final Label start, final Label end, final int index) { int remappedIndex = remap(index, Type.getType(descriptor)); super.visitLocalVariable(name, descriptor, signature, start, end, remappedIndex); }
@Override public void visitIincInsn(final int var, final int increment) { mv.visitIincInsn(remap(var, Type.INT_TYPE), increment); }
@Override public void visitVarInsn(final int opcode, final int var) { Type varType; switch (opcode) { case Opcodes.LLOAD: case Opcodes.LSTORE: varType = Type.LONG_TYPE; break; case Opcodes.DLOAD: case Opcodes.DSTORE: varType = Type.DOUBLE_TYPE; break; case Opcodes.FLOAD: case Opcodes.FSTORE: varType = Type.FLOAT_TYPE; break; case Opcodes.ILOAD: case Opcodes.ISTORE: varType = Type.INT_TYPE; break; case Opcodes.ALOAD: case Opcodes.ASTORE: case Opcodes.RET: varType = OBJECT_TYPE; break; default: throw new IllegalArgumentException("Invalid opcode " + opcode); } super.visitVarInsn(opcode, remap(var, varType)); }
@Override public void visitVarInsn(final int opcode, final int var) { Type varType; switch (opcode) { case Opcodes.LLOAD: case Opcodes.LSTORE: varType = Type.LONG_TYPE; break; case Opcodes.DLOAD: case Opcodes.DSTORE: varType = Type.DOUBLE_TYPE; break; case Opcodes.FLOAD: case Opcodes.FSTORE: varType = Type.FLOAT_TYPE; break; case Opcodes.ILOAD: case Opcodes.ISTORE: varType = Type.INT_TYPE; break; case Opcodes.ALOAD: case Opcodes.ASTORE: case Opcodes.RET: varType = OBJECT_TYPE; break; default: throw new IllegalArgumentException("Invalid opcode " + opcode); } super.visitVarInsn(opcode, remap(var, varType)); }
@Override public void visitIincInsn(final int var, final int increment) { super.visitIincInsn(remap(var, Type.INT_TYPE), increment); }
@Override public void visitIincInsn(final int var, final int increment) { super.visitIincInsn(remap(var, Type.INT_TYPE), increment); }
@Override public void visitVarInsn(final int opcode, final int var) { Type varType; switch (opcode) { case Opcodes.LLOAD: case Opcodes.LSTORE: varType = Type.LONG_TYPE; break; case Opcodes.DLOAD: case Opcodes.DSTORE: varType = Type.DOUBLE_TYPE; break; case Opcodes.FLOAD: case Opcodes.FSTORE: varType = Type.FLOAT_TYPE; break; case Opcodes.ILOAD: case Opcodes.ISTORE: varType = Type.INT_TYPE; break; case Opcodes.ALOAD: case Opcodes.ASTORE: case Opcodes.RET: varType = OBJECT_TYPE; break; default: throw new IllegalArgumentException("Invalid opcode " + opcode); } super.visitVarInsn(opcode, remap(var, varType)); }
@Override public AnnotationVisitor visitLocalVariableAnnotation( final int typeRef, final TypePath typePath, final Label[] start, final Label[] end, final int[] index, final String descriptor, final boolean visible) { Type type = Type.getType(descriptor); int[] remappedIndex = new int[index.length]; for (int i = 0; i < remappedIndex.length; ++i) { remappedIndex[i] = remap(index[i], type); } return super.visitLocalVariableAnnotation( typeRef, typePath, start, end, remappedIndex, descriptor, visible); }
@Override public AnnotationVisitor visitLocalVariableAnnotation( final int typeRef, final TypePath typePath, final Label[] start, final Label[] end, final int[] index, final String descriptor, final boolean visible) { Type type = Type.getType(descriptor); int[] remappedIndex = new int[index.length]; for (int i = 0; i < remappedIndex.length; ++i) { remappedIndex[i] = remap(index[i], type); } return super.visitLocalVariableAnnotation( typeRef, typePath, start, end, remappedIndex, descriptor, visible); }
@Override public AnnotationVisitor visitLocalVariableAnnotation( final int typeRef, final TypePath typePath, final Label[] start, final Label[] end, final int[] index, final String descriptor, final boolean visible) { Type type = Type.getType(descriptor); int[] remappedIndex = new int[index.length]; for (int i = 0; i < remappedIndex.length; ++i) { remappedIndex[i] = remap(index[i], type); } return super.visitLocalVariableAnnotation( typeRef, typePath, start, end, remappedIndex, descriptor, visible); }
varType = Type.getObjectType((String) localType); setFrameLocal(remap(oldVar, varType), localType);
varType = Type.getObjectType((String) localType); setFrameLocal(remap(oldVar, varType), localType);
typ = Type.getObjectType((String) t); setFrameLocal(remap(index, typ), t);
varType = Type.getObjectType((String) localType); setFrameLocal(remap(oldVar, varType), localType);