|
|
@ -37,8 +37,9 @@ public class SwitchHelper { |
|
|
|
List<List<Exprent>> caseValues = switchStatement.getCaseValues(); |
|
|
|
List<List<Exprent>> caseValues = switchStatement.getCaseValues(); |
|
|
|
Map<Exprent, Exprent> mapping = new HashMap<>(caseValues.size()); |
|
|
|
Map<Exprent, Exprent> mapping = new HashMap<>(caseValues.size()); |
|
|
|
ArrayExprent array = (ArrayExprent)value; |
|
|
|
ArrayExprent array = (ArrayExprent)value; |
|
|
|
|
|
|
|
FieldExprent arrayField = (FieldExprent)array.getArray(); |
|
|
|
ClassesProcessor.ClassNode classNode = |
|
|
|
ClassesProcessor.ClassNode classNode = |
|
|
|
DecompilerContext.getClassProcessor().getMapRootClasses().get(((FieldExprent)array.getArray()).getClassname()); |
|
|
|
DecompilerContext.getClassProcessor().getMapRootClasses().get(arrayField.getClassname()); |
|
|
|
if (classNode != null) { |
|
|
|
if (classNode != null) { |
|
|
|
MethodWrapper wrapper = classNode.getWrapper().getMethodWrapper(CodeConstants.CLINIT_NAME, "()V"); |
|
|
|
MethodWrapper wrapper = classNode.getWrapper().getMethodWrapper(CodeConstants.CLINIT_NAME, "()V"); |
|
|
|
if (wrapper != null) { |
|
|
|
if (wrapper != null) { |
|
|
@ -48,7 +49,7 @@ public class SwitchHelper { |
|
|
|
if (exprent instanceof AssignmentExprent) { |
|
|
|
if (exprent instanceof AssignmentExprent) { |
|
|
|
AssignmentExprent assignment = (AssignmentExprent)exprent; |
|
|
|
AssignmentExprent assignment = (AssignmentExprent)exprent; |
|
|
|
Exprent left = assignment.getLeft(); |
|
|
|
Exprent left = assignment.getLeft(); |
|
|
|
if (isEnumArray(left)) { |
|
|
|
if (left.type == Exprent.EXPRENT_ARRAY && ((ArrayExprent)left).getArray().equals(arrayField)) { |
|
|
|
mapping.put(assignment.getRight(), ((InvocationExprent)((ArrayExprent)left).getIndex()).getInstance()); |
|
|
|
mapping.put(assignment.getRight(), ((InvocationExprent)((ArrayExprent)left).getIndex()).getInstance()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|