Class ExecutionContext

java.lang.Object
org.antublue.test.engine.internal.execution.ExecutionContext

public class ExecutionContext extends Object
Class to implement ExecutionContext
  • Constructor Details

    • ExecutionContext

      public ExecutionContext(org.junit.platform.engine.ExecutionRequest executionRequest)
      Constructor
      Parameters:
      executionRequest - executionContext
    • ExecutionContext

      public ExecutionContext(ExecutionContext executionContext)
      Copy constructor
      Parameters:
      executionContext - executionContext
  • Method Details

    • getExecutionRequest

      public org.junit.platform.engine.ExecutionRequest getExecutionRequest()
      Method to get the execution request
      Returns:
      the execution request
    • put

      public <T> T put(Object key, Object value)
      Method to store an Object in the execution context
      Parameters:
      key - key
      value - value
      Returns:
      the existing value, or null if there is no existing value
    • get

      public <T> T get(Object key)
      Method to get an Object from the execution context
      Type Parameters:
      T - the return type
      Parameters:
      key - key
      Returns:
      an Object
    • get

      public <T> T get(Object key, Class<T> clazz)
      Method to get an Object from the execution context
      Type Parameters:
      T - the return type
      Parameters:
      key - key
      clazz - clazz
      Returns:
      the value
    • containsKey

      public boolean containsKey(Object key)
      Method to return if the execution context contains a value for a key
      Parameters:
      key - key
      Returns:
      true if a value exists, else false
    • remove

      public <T> T remove(Object key)
      Method to remove a value for a key
      Type Parameters:
      T - the return type
      Parameters:
      key - key
      Returns:
      the value, or null if a value for the key doesn't exist
    • remove

      public <T> T remove(Object key, Class<T> clazz)
      Method to remove a value for a key
      Type Parameters:
      T - the return type
      Parameters:
      key - key
      clazz - clazz
      Returns:
      an Object, or null if a value for the key doesn't exist