Package processing.mode.java.preproc
Class PreprocessIssueMessageSimplifier.EvenCountTemplateMessageSimplifierStrategy
java.lang.Object
processing.mode.java.preproc.PreprocessIssueMessageSimplifier.EvenCountTemplateMessageSimplifierStrategy
- All Implemented Interfaces:
PreprocessIssueMessageSimplifier.PreprocIssueMessageSimplifierStrategy
- Enclosing class:
- PreprocessIssueMessageSimplifier
protected static class PreprocessIssueMessageSimplifier.EvenCountTemplateMessageSimplifierStrategy
extends Object
implements PreprocessIssueMessageSimplifier.PreprocIssueMessageSimplifierStrategy
Strategy to check to make sure that the number of occurrences of a token are even.
Strategy to ensure that there are an even number of tokens like even number of double quotes for example.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreate a new even count simplifier strategy.protectedEvenCountTemplateMessageSimplifierStrategy(String newToken, String newFilter) Create a new even count simplifier strategy where some text needs to be filtered out prior to checking if the simplifier is relevant. -
Method Summary
Modifier and TypeMethodDescriptionAttempt to simplify an error message.
-
Constructor Details
-
EvenCountTemplateMessageSimplifierStrategy
Create a new even count simplifier strategy.- Parameters:
newToken- The token that needs to be balanced.
-
EvenCountTemplateMessageSimplifierStrategy
Create a new even count simplifier strategy where some text needs to be filtered out prior to checking if the simplifier is relevant.- Parameters:
newToken- The token that needs to be balanced.newFilter- The text to be filtered out.
-
-
Method Details
-
simplify
Description copied from interface:PreprocessIssueMessageSimplifier.PreprocIssueMessageSimplifierStrategyAttempt to simplify an error message.- Specified by:
simplifyin interfacePreprocessIssueMessageSimplifier.PreprocIssueMessageSimplifierStrategy- Parameters:
message- The message to be simplified.- Returns:
- An optional with an improved message or an empty optional if no improvements could be made by this strategy.
-