我正在尝试在 Java 中使用 JAD 反编译几个 jar 文件(我也尝试过 JD-GUI,但运气更差),但我遇到了很多错误。一种类型(易于修复)似乎是内部类,但我也发现了这段代码:
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;
}
使用如下:
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;
}
知道这个构造最初可能是什么吗?