Common Superclass for SWITCH Instructions
Often, it is irrelevant if a LOOKUPSWITCH or a TABLESWITCH is the concrete
implementation of a SWITCH instruction. This is, for example, the case in a
control flow analysis where merely the default and all other possible branch
targets are of interest without being interested in the data selecting each of
these possible paths. It is, thus, sensible to compact the common features of
both concrete SWITCHes, i.e. basically the collection of branch targets, in a
common superclass.
The appended patch performs this alteration with practically no impact on
existing code. In the long run, it might be desirable to have both
implementations return a common instruction type for AbstractInsnNode.getType()
- this would, however, impact existing code and may break some.
Regards,
Thomas