io.contract_testing.contractcase.definitions.matchers.CascadingContextMatcher Maven / Gradle / Ivy
Show all versions of definitions Show documentation
package io.contract_testing.contractcase.definitions.matchers;
/**
* 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.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-10-02T11:15:21.456Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = io.contract_testing.contractcase.definitions.$Module.class, fqn = "@contract-case/case-definition-dsl.matchers.CascadingContextMatcher")
public abstract class CascadingContextMatcher extends io.contract_testing.contractcase.definitions.matchers.AnyMatcher {
protected CascadingContextMatcher(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected CascadingContextMatcher(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param child
- The matcher to apply these context changes to.
This parameter is required.
* @param contextModifiers - a map of properties to add to the context object.
This parameter is required.
* @param currentRunModifiers - a map of properties to add to the current run object.
This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
protected CascadingContextMatcher(final @org.jetbrains.annotations.NotNull java.lang.Object child, final @org.jetbrains.annotations.NotNull java.util.Map contextModifiers, final @org.jetbrains.annotations.NotNull java.util.Map currentRunModifiers) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { child, java.util.Objects.requireNonNull(contextModifiers, "contextModifiers is required"), java.util.Objects.requireNonNull(currentRunModifiers, "currentRunModifiers is required") });
}
/**
* If extending this class, do not override this method (or if you do, make sure you call super.toJSON()
).
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public @org.jetbrains.annotations.NotNull java.lang.Object toJSON() {
return software.amazon.jsii.Kernel.call(this, "toJSON", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
* A proxy class which represents a concrete javascript instance of this type.
*/
@software.amazon.jsii.Internal
private static final class Jsii$Proxy extends io.contract_testing.contractcase.definitions.matchers.CascadingContextMatcher {
protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
}
}