Class CascadingContextMatcher

  • All Implemented Interfaces:
    software.amazon.jsii.JsiiSerializable
    Direct Known Subclasses:
    ChangeLogLevel, ExactlyLike, ShapedLike, WithExample

    @Generated(value="jsii-pacmak/1.112.0 (build de1bc80)",
               date="2025-08-20T01:46:20.839Z")
    @Stability(Stable)
    public abstract class CascadingContextMatcher
    extends AnyMatcher
    This is a passthrough matcher that does nothing except call the child matcher with the current actual data.

    It's useful for taking advantage of the context cascading available on all matchers without needing to write you own matcher. Extend it if you want to make a matcher that only changes the context object. If you don't know what this means, you don't need to extend this matcher.

    Due to limitations with JSii, extending implementations MUST NOT override toJSON, or MUST return the result of super.toJSON() as part of their toJSON method.

    • Nested Class Summary

      • Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

        software.amazon.jsii.JsiiObject.InitializationMode
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Object toJSON()
      If extending this class, do not override this method (or if you do, make sure you call super.toJSON()).
      • Methods inherited from class software.amazon.jsii.JsiiObject

        jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
      • Methods inherited from interface software.amazon.jsii.JsiiSerializable

        $jsii$toJson
    • Constructor Detail

      • CascadingContextMatcher

        protected CascadingContextMatcher​(software.amazon.jsii.JsiiObjectRef objRef)
      • CascadingContextMatcher

        protected CascadingContextMatcher​(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
      • CascadingContextMatcher

        @Stability(Stable)
        protected CascadingContextMatcher​(@NotNull
                                          Object child,
                                          @NotNull
                                          Map<String,​String> contextModifiers,
                                          @NotNull
                                          Map<String,​String> currentRunModifiers)
        This is a passthrough matcher that does nothing except call the child matcher with the current actual data.

        It's useful for taking advantage of the context cascading available on all matchers without needing to write you own matcher. Extend it if you want to make a matcher that only changes the context object. If you don't know what this means, you don't need to extend this matcher.

        Due to limitations with JSii, extending implementations MUST NOT override toJSON, or MUST return the result of super.toJSON() as part of their toJSON method.

        Parameters:
        child -
        • The matcher to apply these context changes to.
        This parameter is required.
        contextModifiers -
        • a map of properties to add to the context object.
        This parameter is required.
        currentRunModifiers -
        • a map of properties to add to the current run object.
        This parameter is required.
    • Method Detail

      • toJSON

        @Stability(Stable)
        @NotNull
        public Object toJSON()
        If extending this class, do not override this method (or if you do, make sure you call super.toJSON()).
        Overrides:
        toJSON in class AnyMatcher
        Returns:
        An object in the matcher format described {@link https://case.contract-testing.io/docs/reference/plugin-framework in the Extending ContractCase documentation}