Class ExecutableRules


  • class ExecutableRules
    extends java.lang.Object
    Stores information about executable rules.
    Author:
    Holger Eichelberger
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List<AbstractRule> rules  
    • Constructor Summary

      Constructors 
      Constructor Description
      ExecutableRules()
      Creates the executable rules structure.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object buildContributing​(AbstractRuleMatchExpression expression, BuildlangExecution visitor)
      Aims at building contributing match expressions if the given expression fails.
      void collect​(Script script)
      Collects the executable rules for script.
      private void collect​(Script script, boolean asParent, java.util.Set<Script> processed, java.util.Set<java.lang.String> knownSignatures)
      Collects the executable rules for script.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ExecutableRules

        public ExecutableRules()
        Creates the executable rules structure.
    • Method Detail

      • collect

        public void collect​(Script script)
        Collects the executable rules for script.
        Parameters:
        script - the script to collect the rules for
      • collect

        private void collect​(Script script,
                             boolean asParent,
                             java.util.Set<Script> processed,
                             java.util.Set<java.lang.String> knownSignatures)
        Collects the executable rules for script.
        Parameters:
        script - the script to collect the rules for
        asParent - was this reached via a parent relationship
        processed - the already processed scripts to avoid loops
        knownSignatures - the known signatures to exclude rules shadowed by inheritance
      • buildContributing

        public java.lang.Object buildContributing​(AbstractRuleMatchExpression expression,
                                                  BuildlangExecution visitor)
                                           throws VilException
        Aims at building contributing match expressions if the given expression fails.
        Parameters:
        expression - the failing expression which shall match after the contributing ones are built
        visitor - the execution visitor
        Returns:
        the result of expression after the contributing ones are considered
        Throws:
        VilException - in case of any execution error