code: private int getIns( int opcode, Class type )
    {
      if( opcode == Opcodes.DUP )
      {
        return isWide( type ) ? Opcodes.DUP2 : opcode;
      }
  
      if( opcode == Opcodes.POP )
      {
        return isWide( type ) ? Opcodes.POP2 : opcode;
      }
  
      switch( opcode )
      {
        case Opcodes.ILOAD:
        case Opcodes.ISTORE:
        case Opcodes.IALOAD:
        case Opcodes.IASTORE:
        case Opcodes.IADD:
        case Opcodes.ISUB:
        case Opcodes.IMUL:
        case Opcodes.IDIV:
        case Opcodes.IREM:
        case Opcodes.INEG:
        case Opcodes.ISHL:
        case Opcodes.ISHR:
        case Opcodes.IUSHR:
        case Opcodes.IAND:
        case Opcodes.IOR:
        case Opcodes.IXOR:
        case Opcodes.IRETURN:
          break;
        default:
          throw new IllegalArgumentException( "Opcode: " + Integer.toHexString( opcode ) + " is not handled" );
      }
  
      if( type == byte.class )
      {
        return Type.BYTE_TYPE.getOpcode( opcode );
      }
      else if( type == char.class )
      {
        return Type.CHAR_TYPE.getOpcode( opcode );
      }
      else if( type == short.class )
      {
        return Type.SHORT_TYPE.getOpcode( opcode );
      }
      else if( type == boolean.class)
      {
        return Type.BOOLEAN_TYPE.getOpcode( opcode );
      }
      else if( type == int.class)
      {
        return Type.INT_TYPE.getOpcode( opcode );
      }
      else if( type == long.class )
      {
        return Type.LONG_TYPE.getOpcode( opcode );
      }
      else if( type == float.class )
      {
        return Type.FLOAT_TYPE.getOpcode( opcode );
      }
      else if( type == double.class )
      {
        return Type.DOUBLE_TYPE.getOpcode( opcode );
      }
      else // handles array/ref types
      {
        return Type.getType(Object.class).getOpcode( opcode );
      }
    }
docs: ------------------ ASM Helpers