Interface RecommenderInterface

  • All Known Implementing Classes:
    Recommender

    public interface RecommenderInterface
    Taking as input a list of tokens which represents a string of tokens taken from all files that the Input processed. It will process these tokens, and produce a list of recommended refactorings, ordered from greatest to least opportunity value. Additionally, after finding a refactoring recommendation, but before adding the recommendation to the list of recommendations, it will compute the opportunity value of that recommendation.
    See Also:
    Recommender, TestRecomender
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int getMaxRefactoringSize()
      Recommended refactorings should be greater than minRefactoringSize but less than maxRefactoringSize, inclusive.
      int getMinRefactoringSize()
      Recommended refactorings should be greater than minRefactoringSize but less than maxRefactoringSize, inclusive.
      java.util.List<? extends RefactoringInterface> getRefactorings()
      The primary functionality for recommender.
      java.util.List<? extends TokenInterface> getTokens()  
      void setMaxRefactoringSize()
      Recommended refactorings should be greater than minRefactoringSize but less than maxRefactoringSize, inclusive.
      void setMaxRefactoringSize​(int input)
      Recommended refactorings should be greater than minRefactoringSize but less than maxRefactoringSize, inclusive.
      void setMinRefactoringSize()
      Recommended refactorings should be greater than minRefactoringSize but less than maxRefactoringSize, inclusive.
      void setMinRefactoringSize​(int input)
      Recommended refactorings should be greater than minRefactoringSize but less than maxRefactoringSize, inclusive.
      void setRefactorings​(java.util.List<? extends RefactoringInterface> input)
      Sets recommender's list of refactorings to a pre-existing refactoring list.
      void setTokens​(java.util.List<? extends TokenInterface> input)
      Sets the list of tokens from which recommendations are generated to the input list parameter.
    • Method Detail

      • getTokens

        java.util.List<? extends TokenInterface> getTokens()
        Returns:
        the list of tokens from which the recommendations are generated.
      • setTokens

        void setTokens​(java.util.List<? extends TokenInterface> input)
        Sets the list of tokens from which recommendations are generated to the input list parameter.
        Parameters:
        input - a list of token objects.
      • getRefactorings

        java.util.List<? extends RefactoringInterface> getRefactorings()
        The primary functionality for recommender.
        Returns:
        a complete list of all refactoring recommendations.
      • setRefactorings

        void setRefactorings​(java.util.List<? extends RefactoringInterface> input)
        Sets recommender's list of refactorings to a pre-existing refactoring list.
        Parameters:
        input - a list of Refactoring recommendations.
      • getMinRefactoringSize

        int getMinRefactoringSize()
        Recommended refactorings should be greater than minRefactoringSize but less than maxRefactoringSize, inclusive.
        Returns:
        the minimum number of tokens that can make up a refactoring.
      • setMinRefactoringSize

        void setMinRefactoringSize​(int input)
        Recommended refactorings should be greater than minRefactoringSize but less than maxRefactoringSize, inclusive.
        Parameters:
        input - the minimum number of tokens that can make up a refactoring.
      • setMinRefactoringSize

        void setMinRefactoringSize()
        Recommended refactorings should be greater than minRefactoringSize but less than maxRefactoringSize, inclusive. If no input was provided, sets the min to 0 if Recommender's list of tokens is empty, or to 3% of the size of the token list.
      • getMaxRefactoringSize

        int getMaxRefactoringSize()
        Recommended refactorings should be greater than minRefactoringSize but less than maxRefactoringSize, inclusive.
        Returns:
        the maximum number of tokens that can make up a refactoring.
      • setMaxRefactoringSize

        void setMaxRefactoringSize​(int input)
        Recommended refactorings should be greater than minRefactoringSize but less than maxRefactoringSize, inclusive.
        Parameters:
        input - the maximum number of tokens that can make up a refactoring.
      • setMaxRefactoringSize

        void setMaxRefactoringSize()
        Recommended refactorings should be greater than minRefactoringSize but less than maxRefactoringSize, inclusive. If no input was provided, sets the max to 0 if Recommender's list of tokens is empty, or to 75% of the size of the token list.