Class ExamplePeephole

  • All Implemented Interfaces:
    Peephole

    public class ExamplePeephole
    extends Object
    implements Peephole
    Example peephole that remove all checkcast operations. Resulting class will likely not verify.
    • Constructor Detail

      • ExamplePeephole

        public ExamplePeephole()
    • Method Detail

      • apply

        public boolean apply​(Body b)
        Description copied from interface: Peephole
        Entry point for a peephole. This method is repeatedly called by the peephole driver, until a fixed-point is reached over all peepholes.
        Specified by:
        apply in interface Peephole
        Parameters:
        b - Body to apply peephole to.
        Returns:
        true if the peephole changed in any way the Body it acted on. false otherwise.