Class SwitchMapAnalyzer


  • public class SwitchMapAnalyzer
    extends Object
    Recovers the enum constant behind each ordinal in a javac $SwitchMap holder class by reading its static initializer.
    • Constructor Detail

      • SwitchMapAnalyzer

        public SwitchMapAnalyzer()
    • Method Detail

      • analyzeClass

        public static void analyzeClass​(String holderClass,
                                        List<FieldEntry> fields,
                                        List<IRMethod> methods)
        Finds the class's $SwitchMap fields and analyzes its static initializer to key them, doing nothing when the class declares none.
        Parameters:
        holderClass - the internal name of the class declaring the switch map fields
        fields - the class's declared fields
        methods - the class's methods in IR form