Class RuleImpl.ManualState

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected ManualState()  
    • Constructor Detail

      • ManualState

        protected ManualState()
    • Method Detail

      • matchManual

        public java.lang.Object matchManual​(StackFrame frame,
                                            java.lang.Object[] values)
        Matches #getRule() manually, if applicable.
        Overrides:
        matchManual in class RuleImpl.RuleModeState
        Parameters:
        frame - the stack frame in which to execute the matcher
        values - the values to match against
        Returns:
        the rule application result, or null if the rule did not match
      • matchManualSubRules

        protected java.util.Set<Rule> matchManualSubRules​(Rule rule,
                                                          StackFrame frame,
                                                          java.util.Map<java.lang.String,​java.lang.Object> valuesMap)
        Matches the sub-rules of the given rule manually.
        Parameters:
        rule - the rule for which to match the sub-rules
        frame - the stack frame context
        valuesMap - the map of all values, including super-rule elements
        Returns:
        the matching (non-abstract) sub-rules
      • matchFor

        public boolean matchFor​(StackFrame frame,
                                java.lang.Object[] values)
        Matches this rule against values, and records a match in ExecEnv.getMatches() in case of a match. In case of a unique rule, this method will not match if the rule has already matched against values before.
        Specified by:
        matchFor in class RuleImpl.RuleModeState
        Parameters:
        frame - the stack frame context
        values - the source values to match against
        Returns:
        true iff this rule matches against values
      • matchFor

        public boolean matchFor​(StackFrame frame,
                                java.util.Map<java.lang.String,​java.lang.Object> valuesMap,
                                java.lang.Object[] values)
        Matches this rule against values, and records a match in ExecEnv.getMatches() in case of a match. In case of a unique rule, this method will not match if the rule has already matched against values before.
        Specified by:
        matchFor in class RuleImpl.RuleModeState
        Parameters:
        frame - the stack frame context
        valuesMap - the map of all values, including super-rule elements
        values - the source values to match against
        Returns:
        true iff this rule matches against values