Interface RuleParser

All Superinterfaces:
ObjectParser<Rule>

@NonNullByDefault public interface RuleParser extends ObjectParser<Rule>
RuleParser is the interface to implement by any file parser for Rule object.
Author:
Ravi Nadahar - Initial contribution
  • Method Details

    • startParsingFormat

      @Nullable String startParsingFormat(String syntax, List<String> errors, List<String> warnings)
      Parse the provided syntax string without impacting the rule registry.
      Specified by:
      startParsingFormat in interface ObjectParser<Rule>
      Parameters:
      syntax - the syntax in format.
      errors - the List to use to report errors.
      warnings - the List to be used to report warnings.
      Returns:
      The model name used for parsing if the parsing succeeded without errors; null otherwise.
    • getParsedObjects

      Collection<Rule> getParsedObjects(String modelName)
      Get the Rule objects found when parsing the format.
      Specified by:
      getParsedObjects in interface ObjectParser<Rule>
      Parameters:
      modelName - the model name used when parsing.
      Returns:
      The Collection of Rules.