Package jadx.core.dex.visitors
Class FixSwitchOverEnum
java.lang.Object
jadx.core.dex.visitors.AbstractVisitor
jadx.core.dex.visitors.FixSwitchOverEnum
- All Implemented Interfaces:
IDexTreeVisitor
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidaddToEnumMap(RootNode root, EnumMapAttr mapAttr, InsnNode aputInsn) private static voidIf all static final synthetic fields have DONT_GENERATE => hide whole classprivate static @Nullable FixSwitchOverEnum.EnumMapInfocheckEnumMapAccess(RootNode root, InsnNode checkInsn) private static booleanexecuteReplace(SwitchInsn swInsn, InsnArg arg, InsnArg invVar, IntFunction<Object> caseReplace) private static EnumMapAttr.KeyValueMapgetEnumMap(FieldNode field) private static voidinitClsEnumMap(ClassNode enumCls) private static @Nullable FieldNode[]mapToCases(SwitchInsn swInsn, List<EnumClassAttr.EnumField> fields) private static booleanprocessDirectEnumSwitch(MethodNode mth, SwitchInsn swInsn, InvokeNode invInsn, InsnArg arg) private static booleanprocessEnumSwitch(MethodNode mth, SwitchInsn insn) private static booleanprocessRemappedEnumSwitch(MethodNode mth, SwitchInsn insn, InsnNode wrapInsn, InsnArg arg) booleanVisit classvoidvisit(MethodNode mth) Visit methodMethods inherited from class jadx.core.dex.visitors.AbstractVisitor
getName, init, toString
-
Constructor Details
-
FixSwitchOverEnum
public FixSwitchOverEnum()
-
-
Method Details
-
visit
Description copied from interface:IDexTreeVisitorVisit class- Specified by:
visitin interfaceIDexTreeVisitor- Overrides:
visitin classAbstractVisitor- Returns:
- false for disable child methods and inner classes traversal
- Throws:
JadxException
-
visit
Description copied from interface:IDexTreeVisitorVisit method- Specified by:
visitin interfaceIDexTreeVisitor- Overrides:
visitin classAbstractVisitor- Throws:
JadxException
-
processEnumSwitch
-
executeReplace
private static boolean executeReplace(SwitchInsn swInsn, InsnArg arg, InsnArg invVar, IntFunction<Object> caseReplace) -
processDirectEnumSwitch
private static boolean processDirectEnumSwitch(MethodNode mth, SwitchInsn swInsn, InvokeNode invInsn, InsnArg arg) -
mapToCases
@Nullable private static @Nullable FieldNode[] mapToCases(SwitchInsn swInsn, List<EnumClassAttr.EnumField> fields) -
processRemappedEnumSwitch
private static boolean processRemappedEnumSwitch(MethodNode mth, SwitchInsn insn, InsnNode wrapInsn, InsnArg arg) -
initClsEnumMap
-
getEnumMap
-
addToEnumMap
-
checkEnumMapAccess
@Nullable private static @Nullable FixSwitchOverEnum.EnumMapInfo checkEnumMapAccess(RootNode root, InsnNode checkInsn) -
checkAndHideClass
If all static final synthetic fields have DONT_GENERATE => hide whole class
-