Interface Revision

    • Method Detail

      • getId

        java.lang.String getId()
        Returns the id of this revision. Usually, it is the id of the commit that yields to this revision. However, a VCS may use a dedicated id to identify commits and revisions independently.
        Returns:
        The id of this revision.
      • getOutput

        default java.nio.file.Path getOutput()
        Returns:
        The path to the tracked files and directories.
        See Also:
        VCSEngine.getOutput()
      • getFiles

        java.util.List<VCSFile> getFiles()
        Returns all non-VCS-specific files.
        Returns:
        All non-VCS-specific files.
      • getFilesBySuffix

        default java.util.List<VCSFile> getFilesBySuffix​(java.lang.String suffix)
        Filters the list of files returned by getFiles() and returns only those whose relative path end with suffix. You may use this method to analyze a certain file type only. For instance, call getFilesBySuffix(".java") to get only Java files.
        Parameters:
        suffix - The suffix used to filter the files.
        Returns:
        All files whose relative path end with suffix.
      • getFilesByPrefix

        default java.util.List<VCSFile> getFilesByPrefix​(java.lang.String prefix)
        Filters the list of files returned by getFiles() and returns only those whose relative path start with prefix. You may use this method to analyze files located in a certain directory only. For instance, call getFilesByPrefix("src/main/java") to get only the files located in "src/main/java".
        Parameters:
        prefix - The prefix used to filter the files.
        Returns:
        All files whose relative path start with prefix.
      • getFilesByRegex

        default java.util.List<VCSFile> getFilesByRegex​(java.lang.String regex)
        Filters the list of files returned by getFiles() and returns only those whose relative path match regex. Paths are matched using String.matches(String).
        Parameters:
        regex - The regular expression used to filter the files.
        Returns:
        All files whose relative path match match regex.