Class PassListBuilder


  • public final class PassListBuilder
    extends java.lang.Object
    This class exists to funnel the list of passes through a central mechanism to ensure that the PassFactory can define and enforce conditions that much be met in order for the pass they create to be added to the compilation process.
    • Constructor Detail

    • Method Detail

      • build

        public com.google.common.collect.ImmutableList<PassFactory> build()
      • maybeAdd

        public void maybeAdd​(PassFactory factory)
        Add only if the PassFactory condition evaluates to true.
      • addBefore

        public void addBefore​(PassFactory factory,
                              java.lang.String passName)
        Insert the given pass factory before the factory of the given name. Throws if the specified pass is not present
      • addAfter

        public void addAfter​(PassFactory factory,
                             java.lang.String passName)
        Insert the given pass factory before the factory of the given name. Throws if the specified pass is not present
      • addAllUpTo

        @Deprecated
        public void addAllUpTo​(PassListBuilder other,
                               java.lang.String passName)
        Deprecated.
        replace uses of this method with a more precise definition of a pass configuration.
        Returns the list of pass up to and including the named pass, otherwise return an empty set of passes.

        Do not add new uses of this method.

      • findByName

        public PassFactory findByName​(java.lang.String name)
      • removeByName

        @Deprecated
        public void removeByName​(java.lang.String name)
        Deprecated.
        Do not add new uses to the method. This method exists only for migration purposes. Removing passes piecemeal is very fragile.
        Remove a pass with the specified name.
      • contains

        public boolean contains​(PassFactory factory)
      • assertAllOneTimePasses

        public void assertAllOneTimePasses()
        Verify that all the passes are one-time passes.
      • assertAllLoopablePasses

        public void assertAllLoopablePasses()
        Verify that all the passes are multi-run passes.
      • assertPassOrder

        public void assertPassOrder​(PassFactory pass1,
                                    PassFactory pass2,
                                    java.lang.String msg)
        Asserts that if both PassFactory are present, pass1 is ordered before pass2.