Java에서 JAD를 사용하여 몇 개의 jar 파일을 디 컴파일하려고합니다. (JD-GUI도 적게 사용했지만) 많은 오류가 발생합니다. 한 종류 (쉽게 고칠 수) 내부 클래스와 것 같다, 그러나 나는 또한 코드의이 비트 발견로 사용JAD에서 Java 디 컴파일 - 제한
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;
}
어떤 생각 어떤이 구조 원래 수 있었 니?
왜 내가 테이블을 만들고 그냥 enum의 서수를 직접 사용하지 않는지 궁금해합니다. (그들은 이미'int's입니까?) – kan
좋아, 이제 이해, 설명과 함께 내 대답을 업데이 트되었습니다. – kan