Interface IFixRepository


  • public interface IFixRepository
    The fix repository stores all registered fix artifacts, including:
    • Fixes themselves
    • Context factories
    • Fix change processors
    • Preview providers(???)
    • Method Detail

      • getContextFactory

        IFixContextFactory<? extends IFixContext> getContextFactory​(Class<? extends IFixContext> contextType)
        Provides the quick fix context factory
        Parameters:
        contextType - the quick fix context, cannot be null
        Returns:
        context factory, never null
      • getFixChangeProcessor

        IFixChangeProcessor<?,​?> getFixChangeProcessor​(Class<?> changeType)
        Provides quick fix change processor
        Parameters:
        changeType - change processor type, cannot be null
        Returns:
        change processor, never null
      • getFixes

        Collection<IFix<? extends IFixContext>> getFixes​(CheckUid checkUid)
        Provides the quick fixes collection by check UID
        Parameters:
        checkUid - check UID, cannot be null
        Returns:
        the collection of quicke fixes registered for the given check UID, never null, can be empty
      • hasFixes

        boolean hasFixes​(CheckUid checkUid)
        Indicates whether the registry contains a fix registered for the given check UID
        Parameters:
        checkUid - the check UID, cannot be null
        Returns:
        true if the quick fix exists, false otherwise
      • registerChangeProcessor

        void registerChangeProcessor​(IFixChangeProcessor<? extends IFixChange,​? extends IFixContext> changeProcessor)
        Registers the quick fix change processor
        Parameters:
        changeProcessor - the change processor, cannot be null
      • registerContextFactory

        void registerContextFactory​(IFixContextFactory<? extends IFixContext> contextFactory)
        Registers the quick fix context factory
        Parameters:
        contextFactory - the context factory, cannot be null
      • registerFix

        void registerFix​(IFix<? extends IFixContext> fix)
        Manual addition of a pre-created fix to the repository
        Parameters:
        fix - The fix to add, cannot be null