io.contract_testing.contractcase.definitions.matchers.AnyMatcher Maven / Gradle / Ivy
Show all versions of definitions Show documentation
package io.contract_testing.contractcase.definitions.matchers;
/**
* The base class for all Test Equivalence Matchers.
*
* Extend this if you don't
* have an example in your Matcher. Otherwise, use AnyMatcherWithExample
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-10-02T11:15:21.451Z")
@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.AnyMatcher")
public abstract class AnyMatcher extends software.amazon.jsii.JsiiObject {
protected AnyMatcher(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected AnyMatcher(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param matcherType
- The type string for this matcher (see Extending ContractCase for a description of these strings).
This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
protected AnyMatcher(final @org.jetbrains.annotations.NotNull java.lang.String matcherType) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(matcherType, "matcherType is required") });
}
/**
* Only override this method if you are writing a matcher in a language other than TypeScript.
*
* It exists because the ContractCase matcher format is not legal in all languages that ContractCase supports.
*
* WARNING: Do not return a string from this method. You must instead return
* an object that can be serialised to JSON following the matcher format
* described in Extending ContractCase.
*
* @return An object in the matcher format described in the Extending ContractCase documentation.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
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.AnyMatcher {
protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
}
}