Class NoTracer

  • All Implemented Interfaces:
    ITracer, ITracer, ITracer

    public class NoTracer
    extends NoTracer
    implements ITracer
    Implements a no-action execution tracer.
    Author:
    Holger Eichelberger
    • Field Detail

      • INSTANCE

        public static final ITracer INSTANCE
    • Constructor Detail

      • NoTracer

        private NoTracer()
        Prevents external instantiation.
    • Method Detail

      • visitRule

        public void visitRule​(Rule rule,
                              RuntimeEnvironment<?,​?> environment)
        Description copied from interface: ITracer
        Is called when visiting a rule starts.
        Specified by:
        visitRule in interface ITracer
        Parameters:
        rule - the rule being visited
        environment - the runtime environment
      • visitedRule

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

        public void visitLoop​(IEnumeratingLoop loop,
                              RuntimeEnvironment<?,​?> environment)
        Description copied from interface: ITracer
        Is called when visiting a map starts.
        Specified by:
        visitLoop in interface ITracer
        Parameters:
        loop - the loop being visited
        environment - the runtime environment
      • visitIteratorAssignment

        public void visitIteratorAssignment​(IEnumeratingLoop loop,
                                            VariableDeclaration var,
                                            java.lang.Object value)
        Description copied from interface: ITracer
        Is called when a loop iterator variable is assigned.
        Specified by:
        visitIteratorAssignment in interface ITracer
        Parameters:
        loop - the loop
        var - the iterator variable
        value - the actual value
      • visitedLoop

        public void visitedLoop​(IEnumeratingLoop loop,
                                RuntimeEnvironment<?,​?> environment)
        Description copied from interface: ITracer
        Is called when visiting a map ends.
        Specified by:
        visitedLoop in interface ITracer
        Parameters:
        loop - the loop being visited
        environment - the runtime environment
      • adjustSequenceForMap

        public Collection<?> adjustSequenceForMap​(Collection<?> collection)
        Description copied from interface: ITracer
        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.
        Specified by:
        adjustSequenceForMap in interface ITracer
        Parameters:
        collection - the collection to be considered
        Returns:
        the new sequence (just the elements may be reordered)
      • adjustSequenceForJoin

        public Collection<java.lang.Object> adjustSequenceForJoin​(Collection<java.lang.Object> collection)
        Description copied from interface: ITracer
        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.
        Specified by:
        adjustSequenceForJoin in interface ITracer
        Parameters:
        collection - the collection to be considered
        Returns:
        the new sequence (just the elements may be reordered)
      • visitSystemCall

        public void visitSystemCall​(java.lang.String[] args)
        Description copied from interface: ITracer
        Is called before executing a system call.
        Specified by:
        visitSystemCall in interface ITracer
        Parameters:
        args - the arguments for the system call
      • visitingInstantiator

        public void visitingInstantiator​(java.lang.String name)
        Description copied from interface: ITracer
        Is called when an instantiator is being visited / executed.
        Specified by:
        visitingInstantiator in interface ITracer
        Parameters:
        name - the name of the instantiator
      • visitedInstantiator

        public void visitedInstantiator​(java.lang.String name,
                                        java.lang.Object result)
        Description copied from interface: ITracer
        Is called when an instantiator was visited / executed.
        Specified by:
        visitedInstantiator in interface ITracer
        Parameters:
        name - the name of the instantiator
        result - the result of the execution
      • failedAt

        public void failedAt​(IBuildlangElement element)
        Description copied from interface: ITracer
        Is called when the execution of a build language element failed.
        Specified by:
        failedAt in interface ITracer
        Parameters:
        element - the failed element
      • visitScript

        public void visitScript​(Script script,
                                RuntimeEnvironment<?,​?> environment)
        Description copied from interface: ITracer
        Is called when a script (header) is being visited.
        Specified by:
        visitScript in interface ITracer
        Parameters:
        script - the script
        environment - the runtime environment
      • visitScriptBody

        public void visitScriptBody​(Script script,
                                    RuntimeEnvironment<?,​?> environment)
        Description copied from interface: ITracer
        Is called when a script (body) is being visited.
        Specified by:
        visitScriptBody in interface ITracer
        Parameters:
        script - the script
        environment - the runtime environment
      • visitedScript

        public void visitedScript​(Script script)
        Description copied from interface: ITracer
        Is called when visiting a script ends.
        Specified by:
        visitedScript in interface ITracer
        Parameters:
        script - the script
      • visitAlternative

        public void visitAlternative​(boolean takeIf)
        Description copied from interface: ITracer
        An alternative was visited.
        Specified by:
        visitAlternative in interface ITracer
        Parameters:
        takeIf - if true the if-branch is used, false else the else-branch
      • reset

        public void reset()
        Description copied from interface: ITracer
        Resets this tracer for reuse.
        Specified by:
        reset in interface ITracer
      • visitWhileBody

        public void visitWhileBody()
        Description copied from interface: ITracer
        Is called when visiting a while body starts.
        Specified by:
        visitWhileBody in interface ITracer
      • visitedWhileBody

        public void visitedWhileBody()
        Description copied from interface: ITracer
        Is called when visiting a while body ends.
        Specified by:
        visitedWhileBody in interface ITracer