Annotation Interface Rule


@Target(METHOD) @Retention(RUNTIME) public @interface Rule
Defines a method as a rule within a rule-based system. The arguments of the method are treated as declared facts, and the body of the method constitutes the action of the rule. The conditions of the rule are established through additional method annotations.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    int
    Determines the priority of the rule relative to others.
    Optional identifier or name for the rule.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
  • Field Details

  • Element Details

    • value

      String value
      Optional identifier or name for the rule. Useful for rule management and referencing.
      Returns:
      the declared name of the rule
      Default:
      ""
    • salience

      int salience
      Determines the priority of the rule relative to others.
      Returns:
      the salience of the rule
      Default:
      -2147483648