CommentProcessor.java

1
package pro.verron.officestamper.api;
2
3
/// Abstract base class for processing comments within a paragraph.
4
///
5
/// The CommentProcessor represents a mechanism to manipulate or interpret comments and associated content such as
6
/// placeholders found within a paragraph structure.
7
///
8
/// Subclasses must implement specific processing logic.
9
public abstract class CommentProcessor {
10
11
    /// The processing context for this CommentProcessor instance.
12
    private final ProcessorContext context;
13
14
    /// Constructs a new instance of CommentProcessor to process comments and placeholders within a paragraph.
15
    ///
16
    /// @param context the context containing the paragraph, comment, and placeholder associated with the
17
    ///         processing of this CommentProcessor.
18
    protected CommentProcessor(ProcessorContext context) {
19
        this.context = context;
20
    }
21
22
23
    /// Returns the processing context for this [CommentProcessor] instance.
24
    ///
25
    /// @return the [ProcessorContext] associated with this [CommentProcessor].
26
    protected ProcessorContext context() {
27 1 1. context : replaced return value with null for pro/verron/officestamper/api/CommentProcessor::context → KILLED
        return context;
28
    }
29
30
    /// Returns the paragraph associated with this processor.
31
    ///
32
    /// @return the paragraph.
33
    protected Paragraph paragraph() {
34 1 1. paragraph : replaced return value with null for pro/verron/officestamper/api/CommentProcessor::paragraph → KILLED
        return context.paragraph();
35
    }
36
37
    /// Returns the comment associated with this processor.
38
    ///
39
    /// @return the comment.
40
    protected Comment comment() {
41 1 1. comment : replaced return value with null for pro/verron/officestamper/api/CommentProcessor::comment → KILLED
        return context.comment();
42
    }
43
}

Mutations

27

1.1
Location : context
Killed by : pro.verron.officestamper.test.ProcessorDisplayIfTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorDisplayIfTest]/[test-template:conditionalDisplayOfTableRowsTest(pro.verron.officestamper.test.utils.ContextFactory)]/[test-template-invocation:#2]
replaced return value with null for pro/verron/officestamper/api/CommentProcessor::context → KILLED

34

1.1
Location : paragraph
Killed by : pro.verron.officestamper.test.CustomProcessorTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.CustomProcessorTests]/[test-template:should_allow_custom_processors_injection(pro.verron.officestamper.test.utils.ContextFactory)]/[test-template-invocation:#1]
replaced return value with null for pro/verron/officestamper/api/CommentProcessor::paragraph → KILLED

41

1.1
Location : comment
Killed by : pro.verron.officestamper.test.ProcessorReplaceWithTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ProcessorReplaceWithTest]/[method:notWorking1()]
replaced return value with null for pro/verron/officestamper/api/CommentProcessor::comment → KILLED

Active mutators

Tests examined


Report generated by PIT 1.22.0