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 TypeMethodDescriptionvoid
This method implementsCommentLogger
and simply delegates toaddLeadingCommentItem(Comment)
.void
addLeadingCommentItem
(Content item) Add a comment to the collection of leading comments.void
Add a comment to the collection of trailing comments.abstract ModuleType
getType()
boolean
void
prependLeadingCommentItems
(Collection<? extends Content> items) Replace the leading comments by a new sequence withitems
prepended.void
registerCommentForCodeOriented
(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 implementsCommentLogger
and simply delegates toaddLeadingCommentItem(Comment)
.- Specified by:
addItem
in 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 withitems
prepended.- 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
-