Interface InvariantCheckerHandle


public interface InvariantCheckerHandle
SPI handle for invariant checking.

This interface defines the invariant checking contract implemented by tnsai-quality. The concrete implementation (InvariantChecker) is discovered via SpiLoader. ActionExecutor uses it only for explicit @InvariantCheck state-invariant validation. The pre/postcondition methods are available to standalone and custom integrations; planner expressions are not runtime dispatch gates.

When tnsai-quality is not on the classpath, the factory returns null and ActionExecutor skips optional state-invariant checking.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Factory for creating InvariantCheckerHandle instances.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Checks the postcondition of an action.
    void
    Checks the precondition of an action.
    void
    Checks all @State field invariants.
  • Method Details

    • checkPrecondition

      void checkPrecondition(Method method)
      Checks the precondition of an action.
      Parameters:
      method - the action method
      Throws:
      InvariantViolationException - if precondition fails
    • checkPostcondition

      void checkPostcondition(Method method)
      Checks the postcondition of an action.
      Parameters:
      method - the action method
      Throws:
      InvariantViolationException - if postcondition fails
    • checkStateInvariants

      void checkStateInvariants()
      Checks all @State field invariants.
      Throws:
      InvariantViolationException - if any state invariant fails