Interface ITracer

    • Method Detail

      • visitScript

        void visitScript​(Script script,
                         RuntimeEnvironment<?,​?> environment)
        Is called when a script (header) is being visited.
        Parameters:
        script - the script
        environment - the runtime environment
      • visitScriptBody

        void visitScriptBody​(Script script,
                             RuntimeEnvironment<?,​?> environment)
        Is called when a script (body) is being visited.
        Parameters:
        script - the script
        environment - the runtime environment
      • visitedScript

        void visitedScript​(Script script)
        Is called when visiting a script ends.
        Parameters:
        script - the script
      • visitRule

        void visitRule​(Rule rule,
                       RuntimeEnvironment<?,​?> environment)
        Is called when visiting a rule starts.
        Parameters:
        rule - the rule being visited
        environment - the runtime environment
      • visitedRule

        void visitedRule​(Rule rule,
                         RuntimeEnvironment<?,​?> environment,
                         java.lang.Object result)
        Is called when visiting a rule ends.
        Parameters:
        rule - the rule being visited
        environment - the runtime environment
        result - the result produced by the rule
      • visitLoop

        void visitLoop​(IEnumeratingLoop loop,
                       RuntimeEnvironment<?,​?> environment)
        Is called when visiting a map starts.
        Parameters:
        loop - the loop being visited
        environment - the runtime environment
      • visitIteratorAssignment

        void visitIteratorAssignment​(IEnumeratingLoop loop,
                                     VariableDeclaration var,
                                     java.lang.Object value)
        Is called when a loop iterator variable is assigned.
        Parameters:
        loop - the loop
        var - the iterator variable
        value - the actual value
      • visitedLoop

        void visitedLoop​(IEnumeratingLoop loop,
                         RuntimeEnvironment<?,​?> environment)
        Is called when visiting a map ends.
        Parameters:
        loop - the loop being visited
        environment - the runtime environment
      • adjustSequenceForMap

        Collection<?> adjustSequenceForMap​(Collection<?> collection)
        Allows a tracer to change the sequence of processing a map collection. This is intended for testing and debugging only as it normalizes and, thus, interfers with the actual execution sequence.
        Parameters:
        collection - the collection to be considered
        Returns:
        the new sequence (just the elements may be reordered)
      • adjustSequenceForJoin

        Collection<java.lang.Object> adjustSequenceForJoin​(Collection<java.lang.Object> collection)
        Allows a tracer to change the sequence of processing a map collection. This is intended for testing and debugging only as it normalizes and, thus, interfers with the actual execution sequence.
        Parameters:
        collection - the collection to be considered
        Returns:
        the new sequence (just the elements may be reordered)
      • visitSystemCall

        void visitSystemCall​(java.lang.String[] args)
        Is called before executing a system call.
        Parameters:
        args - the arguments for the system call
      • visitingInstantiator

        void visitingInstantiator​(java.lang.String name)
        Is called when an instantiator is being visited / executed.
        Parameters:
        name - the name of the instantiator
      • visitedInstantiator

        void visitedInstantiator​(java.lang.String name,
                                 java.lang.Object result)
        Is called when an instantiator was visited / executed.
        Parameters:
        name - the name of the instantiator
        result - the result of the execution
      • visitAlternative

        void visitAlternative​(boolean takeIf)
        An alternative was visited.
        Parameters:
        takeIf - if true the if-branch is used, false else the else-branch
      • failedAt

        void failedAt​(IBuildlangElement element)
        Is called when the execution of a build language element failed.
        Parameters:
        element - the failed element
      • reset

        void reset()
        Resets this tracer for reuse.
      • visitWhileBody

        void visitWhileBody()
        Is called when visiting a while body starts.
      • visitedWhileBody

        void visitedWhileBody()
        Is called when visiting a while body ends.