Class ModuleRunnerResult

java.lang.Object
de.hsh.graja.core.ModuleRunnerResult
All Implemented Interfaces:
ContentLogger, Serializable
Direct Known Subclasses:
CheckstyleModuleRunnerResult, CompileModuleRunnerResult, HumanModuleRunnerResult, JunitModuleRunnerResult, PmdModuleRunnerResult

public abstract class ModuleRunnerResult extends Object implements ContentLogger, Serializable
A module runner result is the abstract base class of any module runner result. As an abstract class it provides functions and data for comments (leading and trailing comments). A module runner can append comments to each of the two comment collections. Trailing comments usually are added for a summary report. Leading comments can be used by a module runner for logging the process of module runner execution.
See Also:
  • Constructor Details

  • Method Details

    • addItem

      public void addItem(Content item)
      This method implements CommentLogger and simply delegates to addLeadingCommentItem(Comment).
      Specified by:
      addItem in interface ContentLogger
      Parameters:
      item - a comment to be added to leading comments
    • addLeadingCommentItem

      public void addLeadingCommentItem(Content item)
      Add a comment to the collection of leading comments.
      Parameters:
      item - a comment to be added to leading comments.
    • prependLeadingCommentItems

      public void prependLeadingCommentItems(Collection<? extends Content> items)
      Replace the leading comments by a new sequence with items prepended.
      Parameters:
      items -
    • addTrailingCommentItem

      public void addTrailingCommentItem(Content item)
      Add a comment to the collection of trailing comments.
      Parameters:
      item - a comment to be added to trailing comments.
    • registerCommentForCodeOriented

      public void registerCommentForCodeOriented(SourceCodePosition pos, Content item, String moduleSubRefId)
      Register an error comment to be shown in code oriented feedback
      Parameters:
      item - a comment to be added to code oriented feedback.
      pos - the SourceCodePosition where this comment should occur in the submitted source code
      moduleSubRefId - optional id of the originating submodule like a JUnit testmethod key or a PMD rule name
    • getLeadingComment

      public Sequence getLeadingComment()
      Returns:
      the collection of leading comments
    • getTrailingComment

      public Sequence getTrailingComment()
      Returns:
      the collection of trailing comments
    • isTimeout

      public boolean isTimeout()
      Returns:
      true, if the test run exceeded the maximum runtime
    • setTimeout

      public void setTimeout()
    • getType

      public abstract ModuleType getType()
    • getCommentsPerPosition

      public List<CodeOrientedFeedbackSnippet> getCommentsPerPosition()
      Returns:
      a map of positions for comments to be displayed in code oriented feedback