Class CoveredClassVisitor

    • Field Detail

      • classes

        private Set<Class<?>> classes
        The classes to be polled.
    • Constructor Detail

      • CoveredClassVisitor

        public CoveredClassVisitor​(Set<Class<?>> classes)
        Creates a visitor to poll the given classes for coverage by sequence executions.
        Parameters:
        classes - the set of classes to poll for coverage by a sequence
    • Method Detail

      • visitAfterSequence

        public void visitAfterSequence​(ExecutableSequence eseq)
        Called after execution of a sequence.

        Registers each class covered with the sequence execution results.

        Specified by:
        visitAfterSequence in interface ExecutionVisitor
        Parameters:
        eseq - the visited code sequence
      • checkAndReset

        private boolean checkAndReset​(Class<?> c)
        Calls the coverage instrumentation method.
        Parameters:
        c - the class for which method is to be called
        Returns:
        true if the instrumentation method is true, false otherwise
      • visitBeforeStatement

        public void visitBeforeStatement​(ExecutableSequence eseq,
                                         int i)
        Description copied from interface: ExecutionVisitor
        Invoked by ExecutableSequence.execute before the i-th statement executes.

        Precondition: statements 0..i-1 have been executed.

        Specified by:
        visitBeforeStatement in interface ExecutionVisitor
        Parameters:
        eseq - the code sequence to be visited
        i - the position of statement to visit
      • visitAfterStatement

        public void visitAfterStatement​(ExecutableSequence eseq,
                                        int i)
        Description copied from interface: ExecutionVisitor
        Invoked by ExecutableSequence.execute after the i-th statement executes.

        Precondition: statements 0..i have been executed.

        Specified by:
        visitAfterStatement in interface ExecutionVisitor
        Parameters:
        eseq - the code sequence to be visited
        i - the position of statement to visit
      • initialize

        public void initialize​(ExecutableSequence eseq)
        Description copied from interface: ExecutionVisitor
        Called before execution of a sequence, to allow the visitor to perform any initialization steps required before execution.
        Specified by:
        initialize in interface ExecutionVisitor
        Parameters:
        eseq - the code sequence to be visited