Class PreprocessIssueMessageSimplifier.RegexTemplateMessageSimplifierStrategy

java.lang.Object
processing.mode.java.preproc.PreprocessIssueMessageSimplifier.RegexTemplateMessageSimplifierStrategy
All Implemented Interfaces:
PreprocessIssueMessageSimplifier.PreprocIssueMessageSimplifierStrategy
Enclosing class:
PreprocessIssueMessageSimplifier

protected static class PreprocessIssueMessageSimplifier.RegexTemplateMessageSimplifierStrategy extends Object implements PreprocessIssueMessageSimplifier.PreprocIssueMessageSimplifierStrategy
Strategy that cleans up errors based on a regex matching the error message.
  • Constructor Details

    • RegexTemplateMessageSimplifierStrategy

      public RegexTemplateMessageSimplifierStrategy(String newRegex, String newHintTemplate)
      Create a new instance of this strategy.
      Parameters:
      newRegex - The regex that should be matched in order to activate this strategy.
      newHintTemplate - template string with a "%s" where the "offending snippet of code" can be inserted where the resulting rendered template can be used as an error hint for the user. For example, "Invalid identifier near %s" may be rendered to the user like "Syntax error. Hint: Invalid identifier near ,1a);".
  • Method Details