Class CompilationProgress

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract void begin​(int remainingWork)
      Notifies that the compilation is beginning.
      abstract void done()
      Notifies that the work is done; that is, either the compilation is completed or a cancellation was requested.
      abstract boolean isCanceled()
      Returns whether cancellation of the compilation has been requested.
      abstract void setTaskName​(String name)
      Reports the name (or description) of the current task.
      abstract void worked​(int workIncrement, int remainingWork)
      Notifies that a given amount of work of the compilation has been completed.
    • Constructor Detail

      • CompilationProgress

        public CompilationProgress()
    • Method Detail

      • begin

        public abstract void begin​(int remainingWork)
        Notifies that the compilation is beginning. This is called exactly once per batch compilation. An estimated amount of remaining work is given. This amount will change as the compilation progresses. The new estimated amount of remaining work is reported using worked(int, int).

        Clients should not call this method.

        Parameters:
        remainingWork - the estimated amount of remaining work.
      • done

        public abstract void done()
        Notifies that the work is done; that is, either the compilation is completed or a cancellation was requested. This is called exactly once per batch compilation.

        Clients should not call this method.

      • isCanceled

        public abstract boolean isCanceled()
        Returns whether cancellation of the compilation has been requested.
        Returns:
        true if cancellation has been requested, and false otherwise
      • setTaskName

        public abstract void setTaskName​(String name)
        Reports the name (or description) of the current task.

        Clients should not call this method.

        Parameters:
        name - the name (or description) of the current task
      • worked

        public abstract void worked​(int workIncrement,
                                    int remainingWork)
        Notifies that a given amount of work of the compilation has been completed. Note that this amount represents an installment, as opposed to a cumulative amount of work done to date. Also notifies an estimated amount of remaining work. Note that this amount of remaining work may be greater than the previous estimated amount as new compilation units are injected in the compile loop.

        Clients should not call this method.

        Parameters:
        workIncrement - a non-negative amount of work just completed
        remainingWork - a non-negative amount of estimated remaining work