public int next() {
            int nextPos = index;
            char c = desc.charAt(nextPos);
            if (c == '(') {
                ++index;
                c = desc.charAt(++nextPos);
                param = true;
            }

            if (c == ')') {
                ++index;
                c = desc.charAt(++nextPos);
                param = false;
            }

            while (c == '[')
                c = desc.charAt(++nextPos);

            if (c == 'L') {
                nextPos = desc.indexOf(';', nextPos) + 1;
                if (nextPos <= 0)
                    throw new IndexOutOfBoundsException("bad descriptor");
            }
            else
                ++nextPos;

            curPos = index;
            index = nextPos;
            return curPos;
        }