Package de.hsh.graja.core
Class ModuleRunnerResult
java.lang.Object
de.hsh.graja.core.ModuleRunnerResult
- All Implemented Interfaces:
ContentLogger,Serializable
- Direct Known Subclasses:
CheckstyleModuleRunnerResult,CompileModuleRunnerResult,HumanModuleRunnerResult,JunitModuleRunnerResult,PmdModuleRunnerResult
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method implementsCommentLoggerand simply delegates toaddLeadingCommentItem(Comment).voidaddLeadingCommentItem(Content item) Add a comment to the collection of leading comments.voidAdd a comment to the collection of trailing comments.abstract ModuleTypegetType()booleanvoidprependLeadingCommentItems(Collection<? extends Content> items) Replace the leading comments by a new sequence withitemsprepended.voidregisterCommentForCodeOriented(SourceCodePosition pos, Content item, String moduleSubRefId) Register an error comment to be shown in code oriented feedbackvoid
-
Constructor Details
-
ModuleRunnerResult
-
-
Method Details
-
addItem
This method implementsCommentLoggerand simply delegates toaddLeadingCommentItem(Comment).- Specified by:
addItemin interfaceContentLogger- Parameters:
item- a comment to be added to leading comments
-
addLeadingCommentItem
Add a comment to the collection of leading comments.- Parameters:
item- a comment to be added to leading comments.
-
prependLeadingCommentItems
Replace the leading comments by a new sequence withitemsprepended.- Parameters:
items-
-
addTrailingCommentItem
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 codemoduleSubRefId- optional id of the originating submodule like a JUnit testmethod key or a PMD rule name
-
getLeadingComment
- Returns:
- the collection of leading comments
-
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
-
getCommentsPerPosition
- Returns:
- a map of positions for comments to be displayed in code oriented feedback
-