Interface Contextuals


public interface Contextuals
Provides Contextual related operations. The TCK porting package must provide an implementation of this interface which is suitable for the target implementation.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    A Contextual that can be inspected.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    create(T instance, jakarta.enterprise.context.spi.Context context)
    Creates a dummy inspectable Contextual that will be used with given Context.
  • Field Details

    • PROPERTY_NAME

      static final String PROPERTY_NAME
  • Method Details

    • create

      <T> Contextuals.Inspectable<T> create(T instance, jakarta.enterprise.context.spi.Context context)
      Creates a dummy inspectable Contextual that will be used with given Context. The result does not necessarily fulfil the entire Contextual contract; the TCK only requires it to:
      • return the given instance from Contextual.create(CreationalContext);
      • capture all the parameters passed to Contextual methods in order to fulfil the Contextuals.Inspectable contract.
      Type Parameters:
      T - type of the instance
      Parameters:
      instance - the instance to be returned by Contextual.create(CreationalContext)
      context - the Context that the returned Contextual can be used with
      Returns:
      a Contextual that can be inspected