code: public void encodeType(byte[] frame, int[] limits) {
      JSType.setByte(frame, limits, (byte)JSType.VARIANT);
      JSType.setCount(frame, limits, getCaseCount());
      if (cases != null)
        for (int i = 0; i < cases.length; i++)
          cases[i].encodeType(frame, limits);
    }
docs: Implementation of encodeType