Class Executor


  • public class Executor
    extends java.lang.Object
    Utility to execute a block of code and deal with errors.
    Author:
    Phillip Webb
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static interface  Executor.Command
      A command that can be run.
    • Constructor Summary

      Constructors 
      Constructor Description
      Executor​(java.lang.String failureMessage)
      Create a new Executor instance with a specific message to use on failure.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void run​(Executor.Command command)
      Run the given command, dealing with any exceptions.
      • Methods inherited from class java.lang.Object

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

      • Executor

        public Executor​(java.lang.String failureMessage)
        Create a new Executor instance with a specific message to use on failure.
        Parameters:
        failureMessage - the failure message
    • Method Detail

      • run

        public void run​(Executor.Command command)
                 throws org.eclipse.core.runtime.CoreException
        Run the given command, dealing with any exceptions.
        Parameters:
        command - the command to run
        Throws:
        org.eclipse.core.runtime.CoreException - on error