title: Decompiling java with JAD - limitations
body: <p>I am trying to decompile a couple of jar files using JAD in Java (I tried JD-GUI as well with even less luck), but I get quite a lot of errors. One type (easy to fix) seems to be with internal classes, but I also found this bit of code:</p>
  
  <pre><code>static int[] $SWITCH_TABLE$atp$com$OrderType()
  {
      $SWITCH_TABLE$atp$com$OrderType;
      if($SWITCH_TABLE$atp$com$OrderType == null) goto _L2; else goto _L1
  _L1:
      return;
  _L2:
      JVM INSTR pop ;
      int ai[] = new int[OrderType.values().length];
      try
      {
          ai[OrderType.LIMIT.ordinal()] = 2;
      }
      catch(NoSuchFieldError _ex) { }
      try
      {
          ai[OrderType.MARKET.ordinal()] = 1;
      }
      catch(NoSuchFieldError _ex) { }
      try
      {
          ai[OrderType.STOP.ordinal()] = 3;
      }
      catch(NoSuchFieldError _ex) { }
      try
      {
          ai[OrderType.TAKE.ordinal()] = 4;
      }
      catch(NoSuchFieldError _ex) { }
      return $SWITCH_TABLE$atp$com$OrderType = ai;
  }
  </code></pre>
  
  <p>which is used as follows:</p>
  
  <pre><code>switch($SWITCH_TABLE$atp$com$OrderType()[co.getOrderType().ordinal()])
          {
          case 1: // '\001'
              order = new Order(userID, null, co.getOrderType(), co.getOrderSide(), co.getOrderID(), co.getOrderSecurity(), co.getOrderQuantity(), broker);
              break;
  
          case 2: // '\002'
              order = new Order(userID, null, co.getOrderType(), co.getOrderSide(), co.getOrderPrice(), co.getOrderID(), co.getOrderSecurity(), co.getOrderQuantity(), broker);
              break;
  
          case 3: // '\003'
              order = new Order(userID, null, co.getOrderType(), co.getOrderSide(), co.getOrderPrice(), co.getOrderID(), co.getOrderSecurity(), co.getOrderQuantity(), broker);
              break;
          }
  </code></pre>
  
  <p>Any idea what this construct originally could have been?</p>