Interface RuleDescrBuilder

All Superinterfaces:
AnnotatedDescrBuilder<RuleDescrBuilder>, AttributeSupportBuilder<RuleDescrBuilder>, DescrBuilder<PackageDescrBuilder,RuleDescr>
All Known Implementing Classes:
RuleDescrBuilderImpl

A descriptor builder for rules
  • Method Details

    • name

      The name of the rule. Best practice is to keep rule names relatively short, i.e. under 60 characters.
      Parameters:
      name - name of the rule
      Returns:
      itself
    • extendsRule

      RuleDescrBuilder extendsRule(String name)
      Defines the name of the rule this rule extends. It will cause the rule to inherit the LHS from the parent rule.
      Parameters:
      name - name of the parent rule
      Returns:
      itself
    • rhs

      The default right hand side (consequence) of the rule. This is a code block that must be valid according to the used dialect (java or MVEL). In particular, the deprecated '#' character, that was used for one line comments is not supported. For one line comments, please use standard '//'.
      Parameters:
      rhs - the code block
      Returns:
      itself
    • namedRhs

      RuleDescrBuilder namedRhs(String name, String rhs)
      An additional named right hand side (consequence) of the rule. This is a code block that must be valid according to the used dialect (java or MVEL). In particular, the deprecated '#' character, that was used for one line comments is not supported. For one line comments, please use standard '//'.
      Parameters:
      name - the name of the consequence
      rhs - the code block
      Returns:
      itself
    • lhs

      Defines the LHS (condition) of the rule.
      Returns:
      a Conditional Element descriptor builder with the AND CE semantic.