Class PatternSwitchReconstructor

  • All Implemented Interfaces:
    ASTTransform

    public class PatternSwitchReconstructor
    extends Object
    implements ASTTransform
    Reconstructs a pattern-matching switch (Java 21, SwitchBootstraps.typeSwitch) from the $pc$ dispatch loop that control-flow recovery falls back to.
    • Constructor Detail

      • PatternSwitchReconstructor

        public PatternSwitchReconstructor()
    • Method Detail

      • getName

        public String getName()
        Specified by:
        getName in interface ASTTransform
        Returns:
        the name of this transform for logging/debugging
      • transform

        public boolean transform​(BlockStmt block)
        Description copied from interface: ASTTransform
        Transforms the given block statement in place.
        Specified by:
        transform in interface ASTTransform
        Parameters:
        block - the block to transform
        Returns:
        true if any changes were made